in reply to Using a log object in another object without passing it as a parameter
package Log; my $instance; ... sub get_logger { unless ($instance) { $instance = ...; # create the Log instance here # another option is to throw an exception } $instance; }
|
---|