On 9/8/07 7:55 AM, [EMAIL PROTECTED] wrote: > How about this: > > use Log::Abstract qw($log $log_is_debug); > > $log->debug(...) if $log_is_debug; > > which translates to something like > > use Log::Abstract; > my $log = Log::Abstract->get_logger > (category => __PACKAGE__, is_debug_flag => \my $log_is_debug); > > $log->debug(...) if $log_is_debug;
Looks good to me, although I'm not sure how you're going to go from a string argument to Log::Any::import() to creating a lexical in the calling packing and then snagging a reference to it. Evil PAD manipulation? Source filters? Or will you simply use a package global instead? (That'd be fine with me.) -John