Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 114949
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: steven.hartland [...] multiplay.co.uk
Cc:
AdminCc:

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



Subject: $::TZ is not processed
Date: Wed, 1 Jun 2016 15:32:25 +0100
To: bug-Date-Manip [...] rt.cpan.org
From: Steven Hartland <steven.hartland [...] multiplay.co.uk>
When setting $::TZ to configure the timezone for Date-Manip it fails. Enabling debugging shows it thinks its not set: *** DEBUG *** METHOD: main [TZ] undef *** DEBUG *** METHOD: env [zone,TZ] undef *** DEBUG *** METHOD: file [/etc/TIMEZONE] not found *** DEBUG *** METHOD: file [/etc/timezone] not found *** DEBUG *** METHOD: file [/etc/sysconfig/clock] not found *** DEBUG *** METHOD: file [/etc/default/init] not found *** DEBUG *** METHOD: tzdata [] UTC Test script: $ENV{'DATE_MANIP_DEBUG'} = 1; $::TZ = 'UTC'; require Date::Manip; The cause is the use of $$::var which actually check the value of var and not what $var is. The following patch fixes the problem: --- TZ.pm.orig 2016-06-01 14:23:17.959723621 +0000 +++ TZ.pm 2016-06-01 14:23:49.886834275 +0000 @@ -424,9 +424,10 @@ sub _get_curr_zone { } my $var = shift(@methods); print "$var] " if ($debug); - if (defined $$::var) { - push(@zone,$$::var); - print "$$::var\n" if ($debug); + my $val = eval "\$::$var"; + if (defined $val) { + push(@zone,$val); + print "$val\n" if ($debug); } else { print "undef\n" if ($debug); } Regards Steve
Thanks for the report. This will be fixed in the next release.