Function-Runner
view release on metacpan or search on metacpan
lib/Function/Runner.pm view on Meta::CPAN
sub _log_clear { $LOG = [] }
## CONSTRUCTORS
sub new {
# Clear the LOG
$LOG = [];
my $fn_map = {}; # initial function map
my $defn = $_[1]; # user-provided function definition
my $pkg = (caller)[0]; # calling package
_die("missing defn or pkg") unless defined $defn && defined $pkg;
# See: https://perldoc.perl.org/perlmod#Symbol-Tables
my $tab = eval '\%'.$pkg.'::'; # symbol table of calling package
peek 3, ['Symbol Table: ','\%'.$pkg.'::',"has ref: \"".ref($tab).'"'];
_mk_fn_map($fn_map,$defn,$tab,$pkg);# build fn_map from $defn and $tab
peek 3, ['Completed fn_map: ',$fn_map];
bless { defn=>$defn,
( run in 1.146 second using v1.01-cache-2.11-cpan-1e74a51a04c )