Debian Codegraph @

bin/basepods

raw
1 #!/usr/bin/env perl
2 # basepods - print out the standard perl*.pod manpages pod paths
3
4 # ------ pragmas
5 use strict;
6 use warnings;
7 use Config;
8
9 our $VERSION = '2.0.0';
10
11 # ------ define variable
12 my $lib = undef; # standard POD library directory
13
14 $lib = "$Config{'installprivlib'}/pods";
15 $lib = "$Config{'installprivlib'}/pod" unless -d $lib;
16
17 opendir(LIB, $lib) || die "$0: can't opendir $lib: $!\n";
18 while ($_ = readdir(LIB)) {
19 print "$lib/$_\n" if /\.pod$/;
20 }
21
22 __END__
23
24 =head1 NAME
25
26 basepods - print out pod paths for the standard perl manpages
27
28 =head1 DESCRIPTION
29
30 This program uses your configuration's C<installprivlib> directory
31 to look up the full paths to those pod pages. Any files in that
32 directory whose names end in C<.pod> will be printed to the standard
33 output, one per line. This is normally used in backticks to produce
34 a list of filenames for other commands.
35
36 =head1 EXAMPLES
37
38 $ podgrep typeglob `basepods`
39
40 $ basepods | grep delt
41 /usr/local/devperl/lib/5.00554/pod/perl5004delta.pod
42 /usr/local/devperl/lib/5.00554/pod/perl5005delta.pod
43 /usr/local/devperl/lib/5.00554/pod/perldelta.pod
44
45 You can also run this using alternate perl binaries, like so:
46
47 $ oldperl -S basepods | grep delt
48 /usr/lib/perl5/pod/perldelta.pod
49
50 $ podgrep -i thread `filsperl basepods | grep delt`
51 ....
52
53 =head1 SEE ALSO
54
55 faqpods(1), modpods(1), pods(1), sitepod(1), podpath(1), and stdpod(1).
56
57 =head1 AUTHORS and COPYRIGHTS
58
59 Copyright (C) 1999 Tom Christiansen.
60 Copyright (C) 2006-2014 Mark Leighton Fisher.
61
62 =head1 LICENSE
63
64 This is free software; you can redistribute it and/or modify it
65 under the terms of either:
66 (a) the GNU General Public License as published by the Free
67 Software Foundation; either version 1, or (at your option) any
68 later version, or
69 (b) the Perl "Artistic License".
70 (This is the Perl 5 licensing scheme.)
71
72 Please note this is a change from the
73 original pmtools-1.00 (still available on CPAN),
74 as pmtools-1.00 were licensed only under the
75 Perl "Artistic License".