Subject: | Subclassing issues with method "today" |
The method "today" (and "d8" and "ymd") blesses the returned object into the superclass and
not my derived class. The work around is to redefine them as done in ::ISO etc but that makes
them use the internal API which is not quite so nice to have to do.
The attached file shows the bug.
Cheers,
Claes
Subject: | date_simple_iso_subclass.pl |
#!/usr/bin/perl
package FooDate;
use base qw(Date::Simple::ISO);
my $v = FooDate->today;
print ref $v, "\n"; # Should print FooDate but prints Date::Simple::ISO