Commit | Line | Data |
---|---|---|
c1c9c817 MG |
1 | package Zeal::Document; |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
6 | ||
7 | our $VERSION = '0.000_001'; | |
8 | ||
9 | use parent qw/Class::Accessor::Fast/; | |
10 | __PACKAGE__->mk_accessors(qw/id name type path docset/); | |
11 | ||
12 | sub fetch { | |
13 | my ($self) = @_; | |
14 | $self->docset->fetch($self->path) | |
15 | } | |
16 | ||
17 | 1; | |
18 | __END__ | |
19 | ||
20 | =encoding utf-8 | |
21 | ||
22 | =head1 NAME | |
23 | ||
24 | Zeal::Document - Class representing a Dash/Zeal document | |
25 | ||
26 | =head1 SYNOPSIS | |
27 | ||
28 | use Zeal::Document; | |
29 | ||
30 | =head1 DESCRIPTION | |
31 | ||
32 | Dash is an offline API documentation browser. Zeal::Document is a class | |
33 | representing a Dash/Zeal document. | |
34 | ||
35 | Available methods: | |
36 | ||
37 | =over | |
38 | ||
39 | =item $doc->B<id> | |
40 | ||
41 | The ID of this document. Not typically interesting. | |
42 | ||
43 | =item $doc->B<name> | |
44 | ||
45 | The name of this document. | |
46 | ||
47 | =item $doc->B<type> | |
48 | ||
49 | The type of this document. The list of types is available on | |
50 | the Dash website: L<http://kapeli.com/docsets#supportedentrytypes> | |
51 | ||
52 | =item $doc->B<path> | |
53 | ||
54 | The path of this document, relative to | |
55 | F<docset_root/Contents/Resources/Documents/>. This can also be a HTTP | |
56 | URL. | |
57 | ||
58 | =item $doc->B<fetch> | |
59 | ||
60 | The HTML content of this document, retrieved from the file system or | |
61 | via HTTP::Tiny. | |
62 | ||
63 | =back | |
64 | ||
65 | =head1 SEE ALSO | |
66 | ||
67 | L<Zeal>, L<http://kapeli.com/dash>, L<http://zealdocs.org> | |
68 | ||
69 | =head1 AUTHOR | |
70 | ||
71 | Marius Gavrilescu, E<lt>marius@ieval.roE<gt> | |
72 | ||
73 | =head1 COPYRIGHT AND LICENSE | |
74 | ||
75 | Copyright (C) 2014 by Marius Gavrilescu | |
76 | ||
77 | This library is free software; you can redistribute it and/or modify | |
78 | it under the same terms as Perl itself, either Perl version 5.20.1 or, | |
79 | at your option, any later version of Perl 5 you may have available. | |
80 | ||
81 | ||
82 | =cut |