- or download this
my $sub = sub { ... };
no strict 'refs';
*{"Alex::Log::$name"} = $sub;
- or download this
sub _doLog {
my ($self, $lid, $pid, $msg) = @_;
...
VALUES ( ?, ?, ? )" );
$sth->execute( $lid, $pid, $msg );
}
- or download this
my $singleton;
sub new {
...
$singleton;
);
- or download this
foreach my $lev( @$levels ) {
no strict 'refs';
...
_doLog(@$lev, @_);
};
}
- or download this
sub _doLog {
my ($lid, $pid, $msg) = @_;
...
VALUES ( ?, ?, ? )" );
#...
}
- or download this
our @EXPORT_OK;
use base 'Exporter';
...
_init();
goto \&Exporter::import;
}
- or download this
foreach my $lev( @$levels ) {
push @EXPORT_OK, $lev->[1]; # set up the allowable exports
...
_doLog(@$lev, @_);
};
}