|Problems? Is your data what you think it is?|
Re^2: Can I from within a module access variables from the calling program? (modular design)by HJO (Acolyte)
|on Oct 29, 2012 at 09:04 UTC||Need Help??|
I finally found some time to try to understand your anwser, I think I did, and most of what you are saying makes sense to me.
So first, I'm using Log::Log4perl because when I looked at a module that could log things, it was one of the first to pop out, and with sufficient help on the web and good comments on it so I could easily learn to use it. (BTW I checked your Log::Lager, and didn't found it on CPAN as your link indicates, and on google I found it on v 0.04.XXX, so thanks for the alternative, but I will stick on Log::Log4perl a little bit longer...)
Secondly, yes my design is very poor, because I don't plan very much things when I'm coding, due to the fact that I'm quite a beginner (well not a complete one) on Perl and on developping script in a professionnal environment... So yes, my code is not very beautiful on those aspects, but I'm trying with the best I can do, but of course, it's not always (well I'd even say never) in the way of Perl, or the good practices with module programming...
So my original issue was : how can I have some coherent logging from my script AND my module (in the same file), without having to double the declaration of my logger ? (of course it would also be perfect if this solution was compatible with Log::Log4perl)
It seems you're quite knowledgeable on this subject, so I'm asking for help and guidance.
Thank you very much in advance for your answer.