- or download this
sub SourcePackage { my($funcname, $package) = @_;
...
{ no strict 'refs'; $coderef = \&{"$package\:\:$funcname"}; }
return B::svref_2object($coderef)->GV->STASH->NAME;
} # SourcePackage()
- or download this
my $srcPkg = SourcePackage($funcname, __PACKAGE__);
- or download this
my $srcPkg = SourcePackage($funcname);