Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-TimeZone CPAN distribution.

Report information
The Basics
Id: 117983
Status: rejected
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.03
Fixed in: (no value)



Subject: Undefined subroutine &Specio::Constraint::Parameterized::dclone
The latest version of D:T breaks Locale::Object::Country. Although trivial usage of it works, anything more complicated fails with: Undefined subroutine &Specio::Constraint::Parameterized::dclone called at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Constraint/Parameterized.pm line 17. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Constraint/Parameterizable.pm line 10. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Constraint/Parameterizable.pm line 10. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Library/Builtins.pm line 14. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Library/Builtins.pm line 14. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Library/String.pm line 11. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Specio/Library/String.pm line 11. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/DateTime/TimeZone/OffsetOnly.pm line 13. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/DateTime/TimeZone/OffsetOnly.pm line 13. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/parent.pm line 16. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/DateTime/TimeZone/Floating.pm line 9. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/DateTime/TimeZone.pm line 12. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/DateTime/TimeZone.pm line 12. # Compilation failed in require at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Locale/Object/Country.pm line 15. # BEGIN failed--compilation aborted at /Users/hornenj/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Locale/Object/Country.pm line 15.
More information. It breaks it you Class::Autouse qw{Storable}; Without that all is well.
On 2016-09-20 09:03:59, NHORNE wrote: Show quoted text
> More information. It breaks it you Class::Autouse qw{Storable}; > Without that all is well.
Some example code would be helpful. Thanks.
On Tue Sep 20 10:42:35 2016, DROLSKY wrote: Show quoted text
> On 2016-09-20 09:03:59, NHORNE wrote:
> > More information. It breaks it you Class::Autouse qw{Storable}; > > Without that all is well.
> > Some example code would be helpful. Thanks.
CGI::Lingua.
On 2016-09-20 09:03:59, NHORNE wrote: Show quoted text
> More information. It breaks it you Class::Autouse qw{Storable}; > Without that all is well.
Ok, I was able to replicate this with: perl -MClass::Autouse=Storable -MLocale::Object -E 'say $_ for Locale::Object::Country->new( code_alpha2 => q{us} )->all_timezones' I'm not sure exactly what's going on, but Class::Autouse looks like a really really bad idea. If I'm reading the code correctly, it's designed to hook into _method_ calls on a class so that if I call Class->new it intercepts the call and loads "Class.pm". So clearly this won't work for Storable because it's not a class and you don't use it by calling methods on Storable! But that said, I would strongly recommend against using Class::Autouse at all. It looks really fragile, as it breaks something like "use Class qw( CONSTANT1 )" where a class that exports anything will now be completely broken by it's interference.
On Tue Sep 20 10:56:36 2016, NHORNE wrote: Show quoted text
> On Tue Sep 20 10:42:35 2016, DROLSKY wrote:
> > On 2016-09-20 09:03:59, NHORNE wrote:
> > > More information. It breaks it you Class::Autouse qw{Storable}; > > > Without that all is well.
> > > > Some example code would be helpful. Thanks.
> > CGI::Lingua. >
When testing with C:L don't use the latest Github version since that has the workaround for this bug added, and also don't have IP::Country, Geo::IPfree or Geo::IP installed, otherwise the code path which demonstrates this problem won't be executed.
On Tue Sep 20 10:56:36 2016, NHORNE wrote: Show quoted text
> On Tue Sep 20 10:42:35 2016, DROLSKY wrote:
> > On 2016-09-20 09:03:59, NHORNE wrote:
> > > More information. It breaks it you Class::Autouse qw{Storable}; > > > Without that all is well.
> > > > Some example code would be helpful. Thanks.
> > CGI::Lingua. >
When testing with C:L don't use the latest Github version since that has the workaround for this bug added, and also don't have IP::Country, Geo::IPfree or Geo::IP installed, otherwise the code path which demonstrates this problem won't be executed.
On 2016-09-20 09:56:36, NHORNE wrote: Show quoted text
> On Tue Sep 20 10:42:35 2016, DROLSKY wrote:
> > On 2016-09-20 09:03:59, NHORNE wrote:
> > > More information. It breaks it you Class::Autouse qw{Storable}; > > > Without that all is well.
> > > > Some example code would be helpful. Thanks.
> > CGI::Lingua
"use Class::Autouse qw( ... Storable )" is just broken, as I pointed out in another reply. I'd suggest not using Class::Autouse at all, but if you do, you have to be sure you only use it with modules that only have an OO interface.