package edt;
use strict;
use DateTime;
our @ISA = qw/ DateTime /;
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my %h_p = @_;
$h_p{year} = '2011';
my $self = $class->SUPER::new( %h_p );
$self->{_TZONE} = $h_p{time_zone};
return bless($self, $class);
}
sub custom {
print "in custom module\n";
}
1;
####
use strict;
use lib qw( . );
use edt;
my $edt = new edt();
print "DateTime::VERSION = ".$DateTime::VERSION."<\n";
print $edt->epoch()."\n";
$edt->custom();
# dies here
$edt->from_epoch( epoch => time() );
####
DateTime::VERSION = 0.70<
1293840000
in custom module
Can't locate object method "_normalize_nanoseconds" via package "2011-01-01T00:00:00" at /usr/lib/perl5/DateTime.pm line 253.
####
erdev1:/home/eureca/Eulerian-Eureca# perl -v
This is perl 5, version 12, subversion 4 (v5.12.4) built for i486-linux-gnu-thread-multi-64int
(with 46 registered patches, see perl -V for more detail)
Copyright 1987-2010, Larry Wall
####
erdev1:/home/eureca/Eulerian-Eureca# uname -a
Linux erdev1 2.6.38-2-686-bigmem #1 SMP Sun May 8 15:43:39 UTC 2011 i686 GNU/Linux