You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this is an HTTP related module but it seems to be a pretty generic module and I have a recommended block of code to add.
I added this block in routine parse_date in a special copy I made:
# WMIC (Windows command line) Date output format from `wmic os get lastbootuptime`
(($yr, $mon, $day, $hr, $min, $sec) =
/^
(\d{4}) # year
(\d\d) # numerical month
(\d\d) # day
(\d\d) # Hour
(\d\d) # Min
(\d\d) # Sec
/x)
||
it may not be a complete change but it recognized the output from the WMIC command available in recent versions of Windows.
I discovered this module when looking for a date conversion and this one was the simple one but "badly named". this should really not be an HTTP module but that can be another discussion. I found this module suggested on http://www.perlmonks.org/?node_id=433565 and I posted the above change on that page.
this might be rambling a bit but I am posting this as a "bug" because I have discovered that sometimes bugs in CPAN modules do not get fixed for a long time (if ever) but bug reports sometimes contain solutions to problems. in one case I found a bug (around 3 years ago now) and reported the problem and my solution and it does not look like the fix has been applied in CPAN. in another case there was a documentation deficiency reported 6-7 years after the last major change to a module and that recommended change solved my problem even though it had not been applied.
I like this module because it is simple to use and easy to understand the code even with what are relatively complex regex cases - it is small enough that it is easy to copy and customize (like this case) without touching the original code. other modules of this class seem to be rather complex and hard to understand or use. and sometimes there are many solutions in CPAN to do something but the best ones are usually the simplest ones.
________________________________
This message is private and confidential. If you have received this message in error, please notify us by replying to this email and then delete it from your system. Thank you for your cooperation. EJ Caimen, Inc.
The text was updated successfully, but these errors were encountered:
Migrated from rt.cpan.org#99398 (status was 'new')
Requestors:
From [email protected] on 2014-10-09 16:37:08
:
The text was updated successfully, but these errors were encountered: