| 1 |
#!/usr/bin/env perl |
| 2 |
# modpods - print out all module pod paths |
| 3 |
# |
| 4 |
# this is a perl program not a shell script |
| 5 |
# so that we can use the correct perl |
| 6 |
|
| 7 |
# ------ pragmas |
| 8 |
use strict; |
| 9 |
use warnings; |
| 10 |
|
| 11 |
our $VERSION = '2.0.0'; |
| 12 |
|
| 13 |
system $^X, "-S", "pminst", "-l"; |
| 14 |
|
| 15 |
__END__ |
| 16 |
|
| 17 |
=head1 NAME |
| 18 |
|
| 19 |
modpods - print out paths for the standard modules |
| 20 |
|
| 21 |
=head1 DESCRIPTION |
| 22 |
|
| 23 |
This program outputs the paths to all installed modules on your systems. |
| 24 |
This includes both the standard modules (which the I<stdpods> command |
| 25 |
produces) and the site-specific ones (which the I<sitepods> command |
| 26 |
produces). |
| 27 |
|
| 28 |
This is just a front-end for calling I<pminst -l>, supplied |
| 29 |
to make it more obvious what it does. |
| 30 |
|
| 31 |
=head1 EXAMPLE |
| 32 |
|
| 33 |
This finds all the modules whose documentation mentions |
| 34 |
destructors, and cats it out at you. |
| 35 |
|
| 36 |
$ podgrep -i destructor `modpods` |
| 37 |
|
| 38 |
=head1 /usr/local/devperl/lib/5.00554/i686-linux/DB_File.pm chunk 371 |
| 39 |
|
| 40 |
Having read L<perltie> you will probably have already guessed that the |
| 41 |
error is caused by the extra copy of the tied object stored in C<$X>. |
| 42 |
If you haven't, then the problem boils down to the fact that the |
| 43 |
B<DB_File> destructor, DESTROY, will not be called until I<all> |
| 44 |
references to the tied object are destroyed. Both the tied variable, |
| 45 |
C<%x>, and C<$X> above hold a reference to the object. The call to |
| 46 |
untie() will destroy the first, but C<$X> still holds a valid |
| 47 |
reference, so the destructor will not get called and the database file |
| 48 |
F<tst.fil> will remain open. The fact that Berkeley DB then reports the |
| 49 |
attempt to open a database that is alreday open via the catch-all |
| 50 |
"Invalid argument" doesn't help. |
| 51 |
|
| 52 |
=head1 /usr/local/devperl/lib/5.00554/Tie/Array.pm chunk 40 |
| 53 |
|
| 54 |
Normal object destructor method. |
| 55 |
|
| 56 |
=head1 SEE ALSO |
| 57 |
|
| 58 |
podgrep(1), modpods(1), pods(1), sitepods(1), podpath(1), and stdpod(1). |
| 59 |
|
| 60 |
=head1 AUTHORS and COPYRIGHTS |
| 61 |
|
| 62 |
Copyright (C) 1999 Tom Christiansen. |
| 63 |
|
| 64 |
Copyright (C) 2006-2014 Mark Leighton Fisher. |
| 65 |
|
| 66 |
=head1 LICENSE |
| 67 |
|
| 68 |
This is free software; you can redistribute it and/or modify it |
| 69 |
under the terms of either: |
| 70 |
(a) the GNU General Public License as published by the Free |
| 71 |
Software Foundation; either version 1, or (at your option) any |
| 72 |
later version, or |
| 73 |
(b) the Perl "Artistic License". |
| 74 |
(This is the Perl 5 licensing scheme.) |
| 75 |
|
| 76 |
Please note this is a change from the |
| 77 |
original pmtools-1.00 (still available on CPAN), |
| 78 |
as pmtools-1.00 were licensed only under the |
| 79 |
Perl "Artistic License". |