All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

As far as the package-named class-level storage: the "use Log::Any qw($log)" syntax is just a convenient shorthand that, imho, will be good enough for some modules. If you are uncomfortable with this, you can use the more standard syntax
my $log = Log::Any->get_logger(category => '...');

and you would use this to create a lexically scoped logger or a logger contained in an object.

As far as the "Any" name - I agree, it isn't ideal, but I haven't been able to think of a better

That implies you are keeping inside Log::Any a hash of some sort with the class as the key and an object or log class as the value. That's what I meant by the class-level storage.

As for::Any, I notice that Log::Abstract seems to be unused at the moment, if you do a CPAN search for "Abstract" and have a read through some of the modules there, there is a precent for this general type of thing.

> As for::Any, I notice that Log::Abstract seems to be unused at the moment, if you do a> CPAN search for "Abstract" and have a read through some of the modules there, there is a> precent for this general type of thing.Thanks, I like that name much better! "Any" has always seemed rather...indecisive. I'm going to retroactively change this in the journal entry.

> I don't mean for $log, I mean for "category => '...'.>> That implies you are keeping inside Log::Any a hash of some sort with