-----BEGIN PGP SIGNED MESSAGE-----
Moin,
please see attached patch.
All tests successful.
u=2.75 s=0.68 cu=184.66 cs=24.10 scripts=949 tests=107137
real 6m7.867s
user 3m10.656s
sys 0m26.229s
Best wishes,
Tels
- --
Signed on Wed Jun 15 12:16:26 2005 with key 0x93B84C15.
Visit my photo gallery at http://bloodgate.com/photos/
PGP key on http://bloodgate.com/tels.asc or per email.
" ...the Machholz Comet is named after the guy who really discovered it.
Bob Comet." -- Zathras26 (763537) on 2005-01-01 at /.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iQEVAwUBQrACFHcLPEOTuEwVAQF03gf/UQwINZMhupDhk0QSh7/YrxoCetfgGGfh
sfjnGfnIK5X9PTdiqoP/JC8+lkrjIYj6EcUdDrwY5ChSWG8zXMpv34tcmeHP7NwM
z7x2q0tNSMUE1qwMa9xbOAAiivFd/wHw/hkQzvMCwQijpeDPREzRcP2H6CEIzYQr
9LmntPNJGy1D74hOKvPTeSC51ak/gisH1hFeJDo+3Y4YqrO2WSjyarBsGWcmkvU2
9ztJgCeprlzyc7USEJ6Dpv9Ht+4ltZHWSurSsUHjrp/9+Rzqho173hKnsEI/xrwH
WgMlFm+Y4Z6id0jnvr9SFOF+ZHayLsPiKbKPdJfAX7jlK7bL1XbP5A==
=bVGF
-----END PGP SIGNATURE-----
diff -ruN blead/lib/Time/Local.pm blead.patch/lib/Time/Local.pm
--- blead/lib/Time/Local.pm 2005-02-10 12:25:50.000000000 +0100
+++ blead.patch/lib/Time/Local.pm 2005-06-15 12:10:35.000000000 +0200
@@ -1,13 +1,12 @@
package Time::Local;
require Exporter;
-use Carp;
use Config;
use strict;
use integer;
use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
-$VERSION = '1.11';
+$VERSION = '1.12';
$VERSION = eval $VERSION;
@ISA = qw( Exporter );
@EXPORT = qw( timegm timelocal );
@@ -96,6 +95,12 @@
($day, $sec);
}
+sub _croak
+ {
+ # load Carp on demand, as to not waste memory in non-error cases
+ require Carp;
+ goto &Carp::croak;
+ }
sub timegm {
my ($sec,$min,$hour,$mday,$month,$year) = @_;
@@ -110,20 +115,18 @@
unless ($Options{no_range_check}) {
if (abs($year) >= 0x7fff) {
$year += 1900;
- croak "Cannot handle date ($sec, $min, $hour, $mday, $month,
*$year*)";
+ _croak ("Cannot handle date ($sec, $min, $hour, $mday, $month,
*$year*)");
}
- croak "Month '$month' out of range 0..11" if $month > 11 or $month < 0;
+ _croak ("Month '$month' out of range 0..11") if $month > 11 or $month <
0;
my $md = $MonthDays[$month];
-# ++$md if $month == 1 and $year % 4 == 0 and
-# ($year % 100 != 0 or ($year + 1900) % 400 == 0);
++$md unless $month != 1 or $year % 4 or !($year % 400);
- croak "Day '$mday' out of range 1..$md" if $mday > $md or $mday <
1;
- croak "Hour '$hour' out of range 0..23" if $hour > 23 or $hour <
0;
- croak "Minute '$min' out of range 0..59" if $min > 59 or $min <
0;
- croak "Second '$sec' out of range 0..59" if $sec > 59 or $sec <
0;
+ _croak ("Day '$mday' out of range 1..$md") if $mday > $md or
$mday < 1;
+ _croak ("Hour '$hour' out of range 0..23") if $hour > 23 or
$hour < 0;
+ _croak ("Minute '$min' out of range 0..59") if $min > 59 or
$min < 0;
+ _croak ("Second '$sec' out of range 0..59") if $sec > 59 or
$sec < 0;
}
my $days = _daygm(undef, undef, undef, $mday, $month, $year);
@@ -138,7 +141,7 @@
warn "Sec too small - $days < $Min{Sec}\n" if $days < $Min{Sec};
warn "Sec too big - $days > $Max{Sec}\n" if $days > $Max{Sec};
$year += 1900;
- croak "Cannot handle date ($sec, $min, $hour, $mday, $month, $year)";
+ _croak ("Cannot handle date ($sec, $min, $hour, $mday, $month, $year)");
}
no integer;