Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: Best way to share logging object among multiple objects?by pileofrogs (Priest) |
on Aug 10, 2010 at 23:45 UTC ( [id://854174]=note: print w/replies, xml ) | Need Help?? |
++ If I understand this correctly, I'd want to use a singleton and a role. Making my logger a singleton makes it so each object uses the same Log::Dispatch object. Making it a role makes it so I don't lose my logging capability down a rabbit hole of multiple inheritance in the event my code gets really complex. Can I even do that? Does that sound right? Did I totally miss the point? Thanks! --Pileofrogs
In Section
Seekers of Perl Wisdom
|
|