Subject: | One Year-handling bug, one redeclaration of hitherto unused variable. |
The today() method produces a date string to be used in notification emails. It correctly adds 1900 to the year returned by localtime(), but does so twice. Fixed in patch.
In store_vars(), $calling_package is declared, assigned into, then immediately declared and assigned into again with different contents. The first assignment therefore has no purpose and serves only to cause a warning. Fixed in patch.
*** Notify.pm Fri Apr 13 03:56:08 2001
--- /usr/local/lib/perl5/site_perl/5.8.0/Carp/Notify.pm Tue Oct 26 10:17:02 2004
***************
*** 396,402 ****
my @days = qw(Sun Mon Tue Wed Thu Fri Sat);
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
- $year += 1900;
my ($gmin, $ghour, $gsdst) = (gmtime(time))[1,2, -1];
my $diffhour = $hour - $ghour;
--- 396,401 ----
***************
*** 417,423 ****
}
elsif ($func){
no strict 'refs';
- my $calling_package = (caller(2))[0]; #eek! This may bite me in the ass.
my ($calling_package) = (caller)[0];
my $package = $calling_package . "::";
--- 416,421 ----