Subject: | Problem with use of CORE::readlink in DateTime::TimeZone::readlink |
When passing in '@_' to the CORE::readlink function, is doesn't return the value that we are looking for. When this is changed to 'shift', it will return the proper value.
I did this on Perl 5.8.0 running on RedHat 8.0. I have DateTime version 0.12 installed with DateTime::TimeZone version 0.15.
Also, some linux distros do not make /etc/localtime a symlink to the appropriate file in /usr/share/zoneinfo. Specifically, RedHat copies the file from /usr/share/zoneinfo to /etc/localtime. This is to combat the problem of calculating the timezone when only the root mounting point is mounted. Just thought I would pass that bit of information on. In looking over the code, I unfortunately can't give you a suggestion on how to get around this but thought I would bring it up for a FAQ.
--- DateTime-TimeZone-0.15-orig/lib/DateTime/TimeZone.pm 2003-05-06 10:41:30.000000000 -0700
+++ DateTime-TimeZone-0.15/lib/DateTime/TimeZone.pm 2003-05-06 10:41:54.000000000 -0700
@@ -102,7 +102,7 @@
die "Cannot determine local time zone\n";
}
-sub DateTime::TimeZone::readlink { CORE::readlink(@_) }
+sub DateTime::TimeZone::readlink { CORE::readlink(shift) }
sub _init
{