in reply to Logging Singleton
It's probably overkill. You could do this...
# SUBS my $log = Log->new(); sub do_this{ $log->log('Log This'); } sub do_that{ $log->log('Log That'); }
Or even this...
# SUBS my $log; sub do_this{ ($log||=Log->new)->log('Log This'); } sub do_that{ ($log||=Log->new)->log('Log That'); }
|
|---|