Bug#552996: libdate-simple-perl: today()/d8()/ymd() broken in subclasses
Damyan Ivanov
dmn at debian.org
Thu Oct 29 14:18:12 UTC 2009
-=| gregor herrmann, Thu, Oct 29, 2009 at 02:06:47PM +0100 |=-
> On Thu, 29 Oct 2009 02:38:32 +0000, Chris Share wrote:
>
> > The expected result, which worked on an Etch system with version 3.01-1 of this package:
> > perl -MDate::Simple::Fmt -e 'print Date::Simple::Fmt::today();'
> > 2009-10-28
> >
> > The obtained result in this version:
> > perl -MDate::Simple::Fmt -e 'print Date::Simple::Fmt::today();'
> > Can't call method "_today" on an undefined value at /usr/lib/perl5/Date/Simple/Fmt.pm line 11.
>
> The diff in e.g. lib/Date/Simple/Fmt.pm between 3.01 and 3.03.03 is
> (ignoring line endings and space) is:
>
> #v+
> --- lib/Date/Simple/Fmt.pm (revision 13088)
> +++ lib/Date/Simple/Fmt.pm (working copy)
> @@ -7,15 +7,15 @@
> *EXPORT_OK = *Date::Simple::EXPORT_OK;
> *EXPORT_TAGS = *Date::Simple::EXPORT_TAGS;
>
> -sub d8 { __PACKAGE__->_d8(@_) }
> -sub today { __PACKAGE__->_today(@_) }
> -sub ymd { __PACKAGE__->_ymd(@_) }
> +sub d8 { shift->_d8(@_) }
> +sub today { shift->_today(@_) }
> +sub ymd { shift->_ymd(@_) }
Note that constructors of Date::Simple (the base class) work both when
called as functions (D::S::today) and when called as a class methods
(D::S->today) so perhaps upstream overlooked the problem in the
subclasses.
--
dam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20091029/43cca63c/attachment.pgp>
More information about the pkg-perl-maintainers
mailing list