| 1 | #!/usr/bin/env perl | ||
| 2 | |||
| 3 | package grok; | ||
| 4 | 39 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 39 | $grok::AUTHORITY = 'cpan:HINRIK'; | |
| 6 | } | ||
| 7 | { | ||
| 8 | 39 | $grok::VERSION = '0.26'; | |
| 9 | } | ||
| 10 | 39 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 39 | ▶ | use warnings FATAL => 'all'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | |||
| 13 | 39 | ▶ | use App::Grok; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 39 | my $grok = App::Grok->new(); | |
| 15 | 39 | $grok->run(); | |
| 16 | |||
| 17 | =encoding utf8 | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | grok - Perl 6 documentation reader | ||
| 22 | |||
| 23 | =head1 SYNOPSIS | ||
| 24 | |||
| 25 | B<grok> <options> <target> | ||
| 26 | |||
| 27 | Options: | ||
| 28 | -F FILE, --file=FILE A file to read Pod from | ||
| 29 | -h, --help Print this help message | ||
| 30 | -i, --index Print index of things grok knows about | ||
| 31 | -l, --locate Locate the target file | ||
| 32 | -o FORMAT, --output=FORMAT The output format, ansi/text/xhtml/pod | ||
| 33 | -T, --no-pager Send output to STDOUT without any pager | ||
| 34 | -U, --update Update all document resources from the web | ||
| 35 | -u, --unformatted Print unformatted Pod output | ||
| 36 | -V, --version Print version information | ||
| 37 | |||
| 38 | If you don't supply the -F or -i options, you need to supply a target. | ||
| 39 | The following targets are recognized: | ||
| 40 | |||
| 41 | * A Synopsis name ('s02', 's02-bits', 's32-rules') | ||
| 42 | * An Apocalypse name ('a01', 'a02', 'a03') | ||
| 43 | * An Exegesis name ('e01', 'e02', 'e03') | ||
| 44 | * An article name ('m01', 'm01-perl6-announcement', 'm02') | ||
| 45 | * A function name from Synopsis 29 | ||
| 46 | * An entry in the Perl 6 Table Index ('%', '!=', 'split') | ||
| 47 | * The Perl 6 Tablet Index itself ('tablet_index') | ||
| 48 | * A path to a file containing Pod ('/some/file.pod') | ||
| 49 | |||
| 50 | =head1 DESCRIPTION | ||
| 51 | |||
| 52 | This little application is intended to be a C<L<perldoc>> for Perl 6. | ||
| 53 | |||
| 54 | =head2 Prior art and inspiration | ||
| 55 | |||
| 56 | =over 4 | ||
| 57 | |||
| 58 | =item Perl 5's C<perldoc> (L<http://perldoc.perl.org/perldoc.html>) | ||
| 59 | |||
| 60 | =item Python's C<pydoc> (L<http://docs.python.org/library/pydoc.html>) | ||
| 61 | |||
| 62 | =item Ruby's C<ri> (L<http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/rdoc/>) | ||
| 63 | |||
| 64 | =item L<http://svn.pugscode.org/pugs/ext/Perldoc/> | ||
| 65 | |||
| 66 | =item L<http://svn.pugscode.org/pugs/examples/perldoc.pl> | ||
| 67 | |||
| 68 | =back | ||
| 69 | |||
| 70 | =head1 CAVEATS | ||
| 71 | |||
| 72 | =head2 Limitations of C<Perl6::Perldoc> | ||
| 73 | |||
| 74 | I<The following only affects Pod 6 documents.> | ||
| 75 | |||
| 76 | =over 2 | ||
| 77 | |||
| 78 | =item * Long lines are not wrapped to fit your terminal. | ||
| 79 | |||
| 80 | =item * Extraneous whitespace in paragraphs is preserved, counter to the spec. | ||
| 81 | |||
| 82 | =item * Formatting codes using french quotes (C<C«»>) aren't parsed correctly, | ||
| 83 | so they are rendered verbatim. | ||
| 84 | |||
| 85 | =item * Formatting codes within C<=table> blocks are ignored. | ||
| 86 | |||
| 87 | =back | ||
| 88 | |||
| 89 | =head1 AUTHOR | ||
| 90 | |||
| 91 | Hinrik Örn Sigurðsson, L<hinrik.sig@gmail.com> | ||
| 92 | |||
| 93 | =head1 LICENSE AND COPYRIGHT | ||
| 94 | |||
| 95 | Copyright 2009 Hinrik Örn Sigurðsson | ||
| 96 | |||
| 97 | C<grok> is distributed under the terms of the Artistic License 2.0. | ||
| 98 | For more details, see the full text of the license in the file F<LICENSE> | ||
| 99 | that came with this distribution. | ||
| 100 | |||
| 101 | =cut | ||