- or download this
package Dsay;
use warnings;
...
sub get_darea() { $d_area }
# Etc.
- or download this
sub common_sub {
say 'call to common sub (d_area is ', get_darea(), ')';
...
common_sub;
dsay "more debugging output from two";
}
- or download this
Can't create a Scope::Guard in void context
- or download this
use Dsay;
package Dsay;
our $d_area;
package main;
- or download this
*d_area = *Dsay::d_area;
- or download this
use Exporter;
our @EXPORT = qw( %debug dsay $d_area );
...
*{ $caller . '::d_area' } = *Dsay::d_area;
goto &Exporter::import
}
- or download this
use Exporter qw{ import };
our @EXPORT = qw( %debug %opt dsay );
...
: "DEBUG: ";
say $prefix, @args;
}
- or download this
sub one {
say "call to one:";
...
dsay "more debugging output from one";
}
# Etc.
- or download this
*{"${callpkg}::$sym"} =
$type eq '&' ? \&{"${pkg}::$sym"} :
...
$type eq '%' ? \%{"${pkg}::$sym"} :
$type eq '*' ? *{"${pkg}::$sym"} :
do { require Carp; Carp::croak("Can't export symbol: $type
+$sym") };
- or download this
*{ $caller . '::d_area' } = 'Dsay::d_area';
- or download this
*{"${callpkg}::$sym"} = "${pkg}::$sym" if '$' eq $type;