pmfunc1p
Cat out a function from a module
Overview
Given a fully-qualified function, this program opens up the file and attempts to display the source for that function.
Examples
$ pmfunc Cwd::_perl_getcwdsub _perl_getcwd{abs_path('.');}
Restrictions
Only subroutines that are defined in the normal fashion are seen, since a simple pattern-match is what does the extraction. Those loaded other ways, such as via AUTOLOAD, typeglob aliasing, or in an "eval", will all necessarily be missed.
This is mostly here for people who are too lazy to type
sed '/^sub getcwd/,/}/p' `pmpath Cwd`orperl -ne 'print if /^sub\s+getcwd\b/ .. /}/' `pmpath Cwd`
Restrictions
AUTHORS and COPYRIGHTS
Copyright (C) 1999 Tom Christiansen.
Copyright (C) 2006-2014, 2018 Mark Leighton Fisher.
Releases
13 releases since Debian 2.2 (Potato); the text changed 7 times.