1PMFUNC(1) User Contributed Perl Documentation PMFUNC(1)
2
3
4
6 pmfunc - cat out a function from a module
7
9 Given a fully-qualified function, this program opens up the file and
10 attempts to cat out the source for that function.
11
13 $ pmfunc Cwd::getcwd
14 sub getcwd
15 {
16 abs_path('.');
17 }
18
20 Only subroutines that are defined in the normal fashion are seen, since
21 a simple pattern-match is what does the extraction. Those loaded other
22 ways, such as via AUTOLOAD, typeglob aliasing, or in an "eval", will
23 all necessarily be missed.
24
25 This is mostly here for people who are too lazy to type
26
27 sed '/^sub getcwd/,/}/p' `pmpath Cwd`
28 or
29 perl -ne 'print if /^sub\s+getcwd\b/ .. /}/' `pmpath Cwd`
30
34 Copyright (C) 1999 Tom Christiansen.
35
36 Copyright (C) 2006-2008 Mark Leighton Fisher.
37
38 This is free software; you can redistribute it and/or modify it under
39 the terms of either: (a) the GNU General Public License as published by
40 the Free Software Foundation; either version 1, or (at your option) any
41 later version, or (b) the Perl "Artistic License". (This is the Perl 5
42 licensing scheme.)
43
44 Please note this is a change from the original pmtools-1.00 (still
45 available on CPAN), as pmtools-1.00 were licensed only under the Perl
46 "Artistic License".
47
48
49
50perl v5.12.0 2010-05-04 PMFUNC(1)