in reply to Logging Singleton

Do you really need a singleton? Consider the following:

package Log; use strict; use warnings; require Exporter; our @ISA = qw(Exporter); our %EXPORT_TAGS = ( 'all' => [ qw( logit ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( logit ); sub logit { # real stuff goes here. printf "%s\n",join("\n",@_); } 1;
Using the above looks something like this:
#!/usr/bin/perl -w use strict; use Log qw/ :all /; logit("This is something to log");
Just another way of doing it I guess...


Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg