root/docs/Perl6/p6doc

Revision 12608, 0.5 kB (checked in by audreyt, 2 years ago)

* p6doc: Make it slightly more useful by allowing "p6doc s03"

as synonym to "p6doc Spec::Operator". Still need a lot of
usability work before this can be released to CPAN to replace
Perl6::Bible.

  • Property svn:mime-type set to text/plain; charset=UTF-8
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2
3 use strict;
4 use Pod::Perldoc;
5
6 my %Spec = qw(
7     1 Overview 2 Syntax       3 Operator     4 Block
8     5 Rule     6 Subroutine   9 Structure    10 Package
9     11 Module 12 Object      13 Overload
10
11     17 Concurrency
12     22 CPAN
13     26 Documentation
14     29 Functions
15 );
16
17 my $doc = shift || 'doc';
18 if ($doc =~ /^S?0*(\d+)/i) {
19     $doc = "Perl6::Spec::$Spec{$1}";
20 }
21 else {
22     # XXX - Be more like "ri" and allow introspection over API etc
23     $doc = "Perl6::\L\u$doc";
24 }
25 @ARGV = $doc;
26
27 exit( Pod::Perldoc->run() );
Note: See TracBrowser for help on using the browser.