Perlapp and DateTime::TimeZone

Posted by doome on 2015-11-06 01:40
Forums: PDK discussion | OS: Windows XP Pro

Unfortunately I'm confined to an old ActivePerl (5.12) and a fittingly old PerlApp (9.2.1).

There seems to be an issue with newer releases of DateTime::TimeZone, such that perlapp adds all the timezone pm files (it's visible with --verbose for example), but regardless the application cannot find it.

#!/usr/bin/perl

use utf8;
use strict;
use warnings;

use DateTime::TimeZone;

# system("pause");

my $localtz = DateTime::TimeZone->new(name => 'local');

print $localtz->name() . "\n";

This triggers the error, it runs nicely unpacked, but when packed it cannot find for example the Europe/Prague time zone (DateTime/TimeZone/Europe/Prague.pm).

--add doesn't seem to help at all, if I pause the program, I don't even see the files in any of the temp directories. Contrary to what's been said in other topics, --add Params::Validate::PP didn't work either, while using --bind did.

So the build batch file looks like this currently:

perlapp --force ^
        --add "DateTime::TimeZone::" ^
        --bind DateTime/TimeZone/Local/Unix.pm[file=C:\perl\site\lib\DateTime\TimeZone\Local\Unix.pm,extract] ^
        --bind DateTime/TimeZone/Local/Win32.pm[file=C:\perl\site\lib\DateTime\TimeZone\Local\Win32.pm,extract] ^
        --bind Params/Validate/PP.pm[file=C:\perl\site\lib\Params\Validate\PP.pm,extract] ^
        --bind Params/Validate/XS.pm[file=C:\perl\site\lib\Params\Validate\XS.pm,extract] ^
        --bind Class/Load/PP.pm[file=C:\perl\site\lib\Class\Load\PP.pm,extract] ^
        localtz.pl

The --add line is entirely useless; right now I guess I should just generate --binds for all the timezone files manually and --trim DateTime::Timezone::* so it doesn't use space unnecessarily.

grahams
ActiveState Staff
Fri, 2015-11-06 09:38

https://community.activestate.com/node/10845#comment-28251

There's an endless tug-of-war between maintainers adding new features and the internal special treatment rules that PerlApp needs to manage modules that are otherwise incompatible. There will come a point (and you might be there already) when you should consider suspending further updates from PPM for the duration of the time you remain on 5.12 and PDK 9.2.

doome | Mon, 2015-11-09 01:53

Thanks for the reply!

Yeah, I was suspecting Module::Runtime too, the installation of some module (via cpanm) must have upgraded it.

I would have switched to 5.18 or newer, but all my attempts at getting GTK and AnyEvent (or even IO::Async) work together, that worked just fine in 5.12, failed with the GUI stopping updating entirely. Same code would run just fine on Linux. And in 5.22 I don't appear to have a working PPM at all, after a fresh install. So I have to make do with what I have.