1PMLOAD(1)             User Contributed Perl Documentation            PMLOAD(1)
2
3
4

NAME

6       pmload - show what files a given module loads at compile time
7

DESCRIPTION

9       Given an argument of a module name, show all the files that are loaded
10       directly or indirectly when the module is used at compile-time.
11

EXAMPLES

13           $ pmload IO::Handle
14           /usr/local/devperl/lib/5.00554/Exporter.pm
15           /usr/local/devperl/lib/5.00554/Carp.pm
16           /usr/local/devperl/lib/5.00554/strict.pm
17           /usr/local/devperl/lib/5.00554/vars.pm
18           /usr/local/devperl/lib/5.00554/i686-linux/DynaLoader.pm
19           /usr/local/devperl/lib/5.00554/i686-linux/IO/Handle.pm
20           /usr/local/devperl/lib/5.00554/Symbol.pm
21           /usr/local/devperl/lib/5.00554/i686-linux/IO/File.pm
22           /usr/local/devperl/lib/5.00554/SelectSaver.pm
23           /usr/local/devperl/lib/5.00554/i686-linux/Fcntl.pm
24           /usr/local/devperl/lib/5.00554/AutoLoader.pm
25           /usr/local/devperl/lib/5.00554/i686-linux/IO.pm
26           /usr/local/devperl/lib/5.00554/i686-linux/IO/Seekable.pm
27
28           $ cat `pmload IO::Socket` | wc -l
29              4015
30
31           $ oldperl -S pmload Tk
32           /usr/lib/perl5/site_perl/Tk/Pretty.pm
33           /usr/lib/perl5/Symbol.pm
34           /usr/lib/perl5/site_perl/Tk/Frame.pm
35           /usr/lib/perl5/site_perl/Tk/Toplevel.pm
36           /usr/lib/perl5/strict.pm
37           /usr/lib/perl5/Exporter.pm
38           /usr/lib/perl5/vars.pm
39           /usr/lib/perl5/site_perl/auto/Tk/Wm/autosplit.ix
40           /usr/lib/perl5/site_perl/auto/Tk/Widget/autosplit.ix
41           /usr/lib/perl5/site_perl/Tk.pm
42           /usr/lib/perl5/i386-linux/5.00404/DynaLoader.pm
43           /usr/lib/perl5/site_perl/auto/Tk/Frame/autosplit.ix
44           /usr/lib/perl5/site_perl/auto/Tk/Toplevel/autosplit.ix
45           /usr/lib/perl5/Carp.pm
46           /usr/lib/perl5/site_perl/auto/Tk/autosplit.ix
47           /usr/lib/perl5/site_perl/Tk/CmdLine.pm
48           /usr/lib/perl5/site_perl/Tk/MainWindow.pm
49           /usr/lib/perl5/site_perl/Tk/Submethods.pm
50           /usr/lib/perl5/site_perl/Tk/Configure.pm
51           /usr/lib/perl5/AutoLoader.pm
52           /usr/lib/perl5/site_perl/Tk/Derived.pm
53           /usr/lib/perl5/site_perl/Tk/Image.pm
54           /usr/lib/perl5/site_perl/Tk/Wm.pm
55           /usr/lib/perl5/site_perl/Tk/Widget.pm
56

NOTE

58       If the programmers used a delayed "require", those files won't show up.
59       Furthermore, this doesn't show all possible files that get opened, just
60       those that those up in %INC.  Most systems have a way to trace system
61       calls.  You can use this to find the real answer.  First, get a
62       baseline with no modules loaded.
63
64           $ strace perl -e 1 2>&1 | perl -nle '/^open\("(.*?)".* = [^-]/ && print $1'
65           /etc/ld.so.cache
66           /lib/libnsl.so.1
67           /lib/libdb.so.2
68           /lib/libdl.so.2
69           /lib/libm.so.6
70           /lib/libc.so.6
71           /lib/libcrypt.so.1
72           /dev/null
73
74           $ strace perl -e 1 2>&1 | grep -c '^open.*= [^-]'
75           8
76
77       Now add module loads and see what you get:
78
79           $ strace perl -MIO::Socket -e 1 2>&1 | grep -c '^open.*= [^-]'
80           24
81
82           $ strace perl -MTk -e 1 2>&1 | grep -c '^open.*= [^-]'
83           35
84

SEE ALSO

86       Devel::Loaded, plxload(1).
87

AUTHORS and COPYRIGHTS

89       Copyright (C) 1999 Tom Christiansen.
90
91       Copyright (C) 2006-2014 Mark Leighton Fisher.
92

LICENSE

94       This is free software; you can redistribute it and/or modify it under
95       the terms of either: (a) the GNU General Public License as published by
96       the Free Software Foundation; either version 1, or (at your option) any
97       later version, or (b) the Perl "Artistic License".  (This is the Perl 5
98       licensing scheme.)
99
100       Please note this is a change from the original pmtools-1.00 (still
101       available on CPAN), as pmtools-1.00 were licensed only under the Perl
102       "Artistic License".
103
104
105
106perl v5.34.0                      2022-01-21                         PMLOAD(1)
Impressum