Spot on sir. Face palm time. Thanks for pointing that out.
Now I remove that extra my it all works as desired:
Get instance called from main
Not yet instantiated
$VAR1 = bless( {
'Log' => 0,
'Screen' => 0
}, 'Helper::Logger' );
Mon Dec 30 01:25:32 2019 Log1
Get instance called from main
Already instantiated
Setting new values
$VAR1 = bless( {
'Log' => 4,
'fh' => \*Helper::Logger::__ANONIO__,
'LogName' => 'CommandLine.log',
'Screen' => 0,
'LogDir' => '/home/random/log',
'_continuation' => 0
}, 'Helper::Logger' );
$VAR1 = bless( {
'Log' => 4,
'fh' => \*Helper::Logger::__ANONIO__,
'LogName' => 'CommandLine.log',
'Screen' => 0,
'LogDir' => '/home/random/log',
'_continuation' => 0
}, 'Helper::Logger' );
Both nicely point to the same object. Perfect
Thanks, R.
Pereant, qui ante nos nostra dixerunt!
|