|The stupid question is the question not asked|
Re: RFC Win32::Event2Log ..gimme back my logfilesby Anonymous Monk
|on Feb 01, 2018 at 23:53 UTC||Need Help??|
congratulations brave programmer
This seems like a good project for you to think out loud, some more, cause you're already doing it, congratulations!
For now concentrate on how a user would use this thing, forget about backends and implementation details, write a few dozen user programs , a few a day, and see what you like the most, concentrate on verbs/actions the user would perform, the programs don't have to actually work they just have to be written like they should work like a user would want them to work
Ask yourself why would anyone use your module instead of EventLog? Answer the question as many times as you can (write a program), you're trying to attract/catch users for your module(?or app?) ... is your bait delicious enough?
If you're only writing for yourself (valid reason) then you don't have to get imaginative with api names, just do the first thing that pops into your head and you can write -- one-offs are easy
For some good/bad ideas take a look at Re: Win32::EventLog searching the wrong logs (MyEventLog for Win32::EventLog, Re: Translating Win32 EventLog Category ) and POE::Component::Win32::EventLog - A POE component that provides non-blocking access to Win32::EventLog.
Some comments about your code
local is used for temporarily overriding globals like this
This is a "Red flag" localtime ... $year + 1900, and an extremely ridiculous one when on the next line you have DateTime->new but we've all been there and you probably know just need more perl DateTime FAQ ( hint DateTime->strftime, DateTime::Format::Strptime , DateTime::Format::Human::Duration, DateTime::Format::Natural, )
Pod convention is uppercase for sections and
Regarding the name?
Well name has to follow from function, and since the function of your module is kinda up in the air ...
yes Win23 might belong in the name
yes Event might belong in the name
No "2" does not belong in the name, not as a substitute for "To" in "ThisToThat". Don't be like "Pod::2::DocBook" thats maximum terrible :) Exception is the terribly named "POD2::IT - Italian translation of Perl core documentation " series cause it should have been lowercase "it" :D
No, "log" does not belong in the name. Sure you're making log files, and "events" are logs, but you're not log framework anything .... use the module DESCRIPTION to help users find your log file creating win32 event log reading parsing module :D
Is your module really an application? Are you sure you're not really working up to App::Win32EventsFilter? Thats where the research/trialerror/userprograms come in .... if 80% of the use cases, the rules, would look identical in a myevents.pl or a commandline win32eventsfilter --add "snackarooony" then the name kinda writes itself
I'm sure there is more stuff I could say if I spent more time thinking about it, but its like tennis :)