package Log; my $instance; ... sub get_logger { unless ($instance) { $instance = ...; # create the Log instance here # another option is to throw an exception } $instance; }
In reply to Re: Using a log object in another object without passing it as a parameter
by pc88mxer
in thread Using a log object in another object without passing it as a parameter
by thezip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |