Fred-Fish-DBUG
view release on metacpan or search on metacpan
lib/Fred/Fish/DBUG/ON.pm view on Meta::CPAN
my $aka = ${$func};
$aka = $1 if ( $dbug_global_vars{strip} && $aka =~ m/::([^:]+)$/ );
$func .= " <aka ${aka}>";
}
# Do we need to know who called ${func} at this time ???
my $line="";
if ( $dbug_global_vars{who_called} && $func ne $dbug_global_vars{main} ) {
# Special functions where there are no valid callers ...
if ( $eval_flg || $func =~ m/::END$/ || $func =~ m/::BEGIN$/ ||
$func =~ m/::UNITCHECK$/ || $func =~ m/::CHECK$/ || $func =~ m/::INIT$/ ||
$func =~ m/::DESTROY$/ ) {
$line = _dbug_called_by (0, 0, 0);
# When Try::Tiny renames the __ANON__ function to ... "YourModule::xxx {...}"
# It doesn't always do this ...
} elsif ( $func =~ m/::try [{][.]{3}[}]\s*$/ ||
$func =~ m/::catch [{][.]{3}[}]\s*$/ ||
$func =~ m/::finally [{][.]{3}[}]\s*$/ ) {
$line = _dbug_called_by (0, 0, 0);
t/off/test_object.pm view on Meta::CPAN
sub import
{
Fred::Fish::DBUG::ON::_dbug_print_no_delay_or_caller ("Import", "%s", ${^GLOBAL_PHASE});
}
# ----------------------------------------------------
# The order the 5 special functions are called in:
# This is regardless of the order defined in this file!
# There can be multiple instances of each of them!
# 1) BEGIN START phase
# 2) UNITCHECK START phase
# 3) CHECK CHECK phase
# 4) INIT INIT phase
# 5) END END phase
# All other functions are called in the RUN phase!
# ----------------------------------------------------
# Called when the module is sourced in ...
BEGIN {
DBUG_ENTER_FUNC (@_);
print_phase ();
DBUG_VOID_RETURN ();
}
# Called right after BEGIN is ...
# Introduced in Perl 5.9.5
UNITCHECK {
DBUG_ENTER_FUNC (@_);
print_phase ();
DBUG_VOID_RETURN ();
}
# Called when the module is sourced in ...
BEGIN {
DBUG_ENTER_FUNC (@_);
print_phase ();
DBUG_VOID_RETURN ();
( run in 0.583 second using v1.01-cache-2.11-cpan-748bfb374f4 )