[Melbourne-pm] DateTime::TimeZone breaking under PAR?
david.warring at gmail.com
Mon Dec 22 11:56:12 PST 2008
Rather this is a result of PAR's use of Module::ScanDeps to resolve
the contents of modules and their external dependencies.
Their are many techniques used by modules too dynamically load other
modules and resources. Some of these are not detected by
DateTime::TimeZone is a notorious example. I've found, for example,
that anything loaded with Module::Pluggable also fails to be detected.
You can run Module::ScanDeps yourself to get a pretty good idea of how
it will resolve a particular module:
% scandeps.pl -e'use DateTime; use DateTime::TimeZone'
You'll see that it's missing all the timezones, eg:
DateTime::TimeZone::Australia::Melbourne has not been detected.
If all else fails, you could try installing your modules to a private
lib, as prescribed by Dominus, http://perlmonks.com/?node_id=682025,
then creating a PAR archive from that.
Hope this helps.
On Mon, Dec 22, 2008 at 6:18 PM, Toby Wintermute <tjc at wintrmute.net> wrote:
> I encountered an odd problem with DateTime::TimeZone today.
> When using it via a PAR archive, it refused to determine the local timezone.
> (This was on a Debian Etch fresh install, albeit with upgraded PAR
> libraries, since the normal Etch ones are quite broken, and then
> confirmed on an Ubuntu Hardy setup as well.)
> The test script that fails:
> use strict;
> use warnings;
> use DateTime;
> use DateTime::TimeZone;
> my $tz = DateTime::TimeZone->new( name => 'local' );
> print "Success!\n";
> Create the PAR with:
> pp -o datetime.par -M DateTime::Locale::en timetest.pl
> (That's on Etch.. If I'm on Hardy I need an extra: -M
> DateTime::TimeZone::Local::Unix )
> Then execute it:
> parl datetime.par timetest.pl
> I get "Cannot determine local time zone", rather than "Success!", on
> both Etch and Hardy.
> DateTime versions:
> Etch - 0.35
> Hardy - 0.42 and then 0.4501
> DateTime::TimeZone versions:
> Etch - 0.42
> Hardy - 0.7701 and then 0.8301
> Any thoughts if I'm Doing It Wrong, before I submit to RT?
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
More information about the Melbourne-pm