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