p5find-sub is a program to find subroutine definitions in your perl5 code. When invoked, it simply prints the location all subroutines, including the name-less ones.
Here is a partial result for perlbrew repository:
> p5find-sub lib | head lib/App/Perlbrew/Path/Installation.pm:11:sub name { lib/App/Perlbrew/Path/Installation.pm:15:sub bin { lib/App/Perlbrew/Path/Installation.pm:19:sub man { lib/App/Perlbrew/Path/Installation.pm:23:sub perl { lib/App/Perlbrew/Path/Installation.pm:27:sub version_file { lib/App/Perlbrew/Path/Installations.pm:12:sub child { lib/App/Perlbrew/Path/Installations.pm:22:sub children { lib/App/Perlbrew/Path/Installations.pm:26:sub list { lib/App/Perlbrew/Path/Root.pm:12:sub bin { lib/App/Perlbrew/Path/Root.pm:16:sub build {
To find a subroutine by its name, pass the name with --name parameter:
--name
> p5find-sub --name do_install_this lib lib/App/perlbrew.pm:1706:sub do_install_this {
To install App::p5find, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::p5find
CPAN shell
perl -MCPAN -e shell install App::p5find
For more information on module installation, please visit the detailed CPAN module installation guide.