From: Marius Gavrilescu Date: Tue, 30 Dec 2014 21:43:21 +0000 (+0200) Subject: Add SYNOPSIS sections for Zeal::Document and ::Docset X-Git-Tag: 0.000_002~3 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=0469af4b76d7a33b0de2fcc696928b22a53099b9;p=zeal.git Add SYNOPSIS sections for Zeal::Document and ::Docset --- diff --git a/lib/Zeal/Docset.pm b/lib/Zeal/Docset.pm index 3a54621..88c52e2 100644 --- a/lib/Zeal/Docset.pm +++ b/lib/Zeal/Docset.pm @@ -83,6 +83,17 @@ Zeal::Docset - Class representing a Dash/Zeal docset =head1 SYNOPSIS use Zeal::Docset; + my $ds = Zeal::Docset->new('/home/mgv/docsets/Perl.docset'); + say $ds->$path; # /home/mgv/docsets/Perl.docset + say $ds->name; # Perl + say $ds->id; # perl + say $ds->family; # perl + + # In SQL LIKE, % is .* and _ is . + my @matches = $ds->query('perlopen%'); # finds perlopenbsd and perlopentut + my $doc = $ds->query('perlsec'); # A Zeal::Document object for perlsec + my $html = $ds->get('perls_c'); # HTML documentation of perlsec + my @docs = $ds->list; # all documents =head1 DESCRIPTION diff --git a/lib/Zeal/Document.pm b/lib/Zeal/Document.pm index f80bad8..8812502 100644 --- a/lib/Zeal/Document.pm +++ b/lib/Zeal/Document.pm @@ -26,6 +26,11 @@ Zeal::Document - Class representing a Dash/Zeal document =head1 SYNOPSIS use Zeal::Document; + my $doc = $ds->query('perlsec'); # $ds is a Zeal::Docset instance + say $doc->name; # perlsec + say $doc->type; # Module + say $doc->path; # perldoc-html/perlsec.html + my $html = $doc->fetch; # $html is now the HTML documentation for perlsec =head1 DESCRIPTION