J
Jerry Krinock
Today, I separated out a file of functions into a separate package:
package MyPackage ;
Instead of 'use', I 'require and call the functions using
MyPackage::aFunction() ;
It works fine except for my Log::Stdlog calls such as:
print {*STDLOG} info => "Hello\n" ;
None of any such calls from inside package functions print to my log
any more. They "just don't work".
A confession: I've come a long way with Perl, but one thing still
beyond my comprehension is the 'tie' function with its "enchanted"
variable that seems to be the magic behind {*STDLOG}. What does the
asterisk do?
How can I make my logs work inside my package?
Thanks very much,
Jerry Krinock
package MyPackage ;
Instead of 'use', I 'require and call the functions using
MyPackage::aFunction() ;
It works fine except for my Log::Stdlog calls such as:
print {*STDLOG} info => "Hello\n" ;
None of any such calls from inside package functions print to my log
any more. They "just don't work".
A confession: I've come a long way with Perl, but one thing still
beyond my comprehension is the 'tie' function with its "enchanted"
variable that seems to be the magic behind {*STDLOG}. What does the
asterisk do?
How can I make my logs work inside my package?
Thanks very much,
Jerry Krinock