Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 65344
Status: rejected
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: ribasushi [...] leporine.io
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: `use Datetime` creates duplicate singletons
DUPLICATED OBJECT ===================== # bless( { # name => "floating", # offset => 0 # }, 'DateTime::TimeZone::Floating' ) INSTANCE 1 (DT::TimeZone ln 49) ====================== # Failed test 'No leaks of DateTime::TimeZone::Floating=HASH(0xa1e8fb8)' # at t/52leaks.t line 310. # Reference first seen at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/DateTime/TimeZone/Floating.pm line 15 # DateTime::TimeZone::Floating::new('DateTime::TimeZone::Floating') called at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/DateTime/TimeZone.pm line 49 # DateTime::TimeZone::new(undef, 'name', 'floating') called at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/i686-linux-thread-multi-64int-ld/DateTime/Infinite.pm line 47 # require DateTime/Infinite.pm called at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/i686-linux-thread-multi-64int-ld/DateTime.pm line 70 # require DateTime.pm called at (eval 21) line 1 # eval 'require DateTime;DateTime->VERSION(0.55);' called at /home/rabbit/devel/dbic/dbgit/lib/DBIx/Class/Optional/Dependencies.pm line 426 # DBIx::Class::Optional::Dependencies::_check_deps('DBIx::Class::Optional::Dependencies', 'test_dt_sqlite') called at /home/rabbit/devel/dbic/dbgit/lib/DBIx/Class/Optional/Dependencies.pm line 391 # DBIx::Class::Optional::Dependencies::req_ok_for('DBIx::Class::Optional::Dependencies', 'test_dt_sqlite') called at t/52leaks.t line 102 INSTANCE 1 (DT::TimeZone ln 70) ====================== # Failed test 'No leaks of DateTime::TimeZone::Floating=HASH(0xa1ef4e0)' # at t/52leaks.t line 310. # Reference first seen at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/DateTime/TimeZone/Floating.pm line 15 # DateTime::TimeZone::Floating::new('DateTime::TimeZone::Floating') called at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/DateTime/TimeZone.pm line 49 # DateTime::TimeZone::new(undef, 'name', 'floating') called at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/i686-linux-thread-multi-64int-ld/DateTime/Infinite.pm line 71 # require DateTime/Infinite.pm called at /home/rabbit/perl5/perlbrew/perls/5.12.3/lib/site_perl/5.12.3/i686-linux-thread-multi-64int-ld/DateTime.pm line 70 # require DateTime.pm called at (eval 21) line 1 # eval 'require DateTime;DateTime->VERSION(0.55);' called at /home/rabbit/devel/dbic/dbgit/lib/DBIx/Class/Optional/Dependencies.pm line 426 # DBIx::Class::Optional::Dependencies::_check_deps('DBIx::Class::Optional::Dependencies', 'test_dt_sqlite') called at /home/rabbit/devel/dbic/dbgit/lib/DBIx/Class/Optional/Dependencies.pm line 391 # DBIx::Class::Optional::Dependencies::req_ok_for('DBIx::Class::Optional::Dependencies', 'test_dt_sqlite') called at t/52leaks.t line 102
The DateTime::TimeZone::Floating isn't a singleton, only the classes generated from Olson data are. I suppose the Floating TZ _could_ be a singleton, although I'm not sure it really matters, since it never does any calculations. Regardless, I don't think this is a bug in DateTime.pm.