Subject: | DateTime::Event::Sunrise carps to stderr during the polar day or night |
Date: | Wed, 01 Jan 2014 22:08:16 +0200 |
To: | bug-DateTime-Event-Sunrise [...] rt.cpan.org |
From: | Lars Noodén <lars.nooden [...] gmail.com> |
DateTime::Event::Sunrise carps to stderr during the polar day or night.
I'd like to quiet the error messages that result from using the module
during periods when the sun does not set or does not rise.
The expected result would be that DateTime::Event::Sunrise should not
produce anything on stderr, except when a real error occurs. The sun
not rising or setting is quite normal in certain latitudes during some
parts of the year and not an error.
This important because the further north or south one goes, the more
noise (can be log noise in certain uses) this misuse of carp causes.
A quick and dirty solution is to comment out the offending lines:
542c542
< carp "Sun never rises!!\n";
---
Show quoted text
> # carp "Sun never rises!!\n";
546c546
< carp "Sun never sets!!\n";
---
Show quoted text> # carp "Sun never sets!!\n";
A fancier option (which I can't add myself) would be to make carping
optional or to have some flag to indicate night or day.
This is in version 0.0503:
$VERSION = '0.0503';
on perl 5.18.1:
perl 5, version 18, subversion 1 (v5.18.1) built
for x86_64-linux-gnu-thread-multi
on Ubuntu:
Linux lubuntu 3.12.0-7-generic #15-Ubuntu SMP Sun
Dec 8 23:39:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Regards,
/Lars