Although all tests are passing for me under Perl 5.8.7 and Ubuntu Linux,
I am receiving the following error in v1.09 when trying to use
localtime() function:
Can't call method "isa" without a package or object reference at
/usr/local/lib/perl/5.8.7/Time/Piece.pm line 101.
Although the code in 101 is wrapped in an eval, it's still causing my
scripts to fail. Here's a patch to evaluate the $class object before
trying to call isa().
--- /tmp/Piece.pm 2006-06-03 12:41:59.000000000 -0400
+++ /usr/local/lib/perl/5.8.7/Time/Piece.pm 2006-06-03
12:39:38.000000000 -0400
@@ -98,7 +98,7 @@
sub _mktime {
my ($class, $time, $islocal) = @_;
- $class = eval { (ref $class)->isa('Time::Piece') } ? ref $class :
$class;
+ $class = eval { (ref $class) && (ref $class)->isa('Time::Piece') }
? ref $class : $class;
if (ref($time)) {
$time->[c_epoch] = undef;
return wantarray ? @$time : bless [@$time, $islocal], $class;
Thanks,
William