# a bare package provided as string perl -MPPI -e "print $_->content for @{ PPI::Document->new(\'package MyPack{ sub new{ bless{}, shift} }')->find('PPI::Statement::Sub') }" #output sub new{ bless{}, shift} # inspecting Data::Dump module (getting its path from %INC) perl -MPPI -MData::Dump -e "print $_->content for @{ PPI::Document->new( $INC{'Data/Dump.pm'} )->find('PPI::Statement::Sub') }; " #output sub dump { local %seen; local %refcnt; local %require; local @fixup; ...