Sat Jan 07 09:30:26 2017: Request 119737 was acted upon.
Transaction: Correspondence added by RSCHUPP
       Queue: Module-ScanDeps
     Subject: Problems with detecting DateTime::Format::Natural dependencies
   Broken in: (no value)
    Severity: (no value)
       Owner: RSCHUPP
  Requestors: webmas...@korten-privat.de
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119737 >


On 2017-01-06 09:58:19, webmas...@korten-privat.de wrote:
> The problem is, that 
> DateTime::Format::Natural.pm (~line 13) uses a whole host of packages 
> with 'use base':
> 
> use base qw(
>      DateTime::Format::Natural::Calc
>      DateTime::Format::Natural::Duration

PAR::Packer uses Module::ScanDeps to scan your program for modules that
it uses (recursively). And this is where Module::ScanDeps falls short
(quoted from its POD):

       Chunks that span multiple lines are not handled correctly.  For
       example, this one works:

           use base 'Foo::Bar';

       But this one does not:

           use base
               'Foo::Bar';

Have you tried packing with "pp -x ..." or "pp -c ..."?

Anyway, I'm adding an explicit rule for DateTime::Format::Natural to 
Module::ScanDeps
that should make it work "out of the box".

> I also had to add '-M DateTime/Format/Natural/Lang/EN.pm'
> 
> Interestingly, in this case the double colon notation did not work.

What exactly didn't work? I tried the following:

pp -o natural.exe -u -M DateTime::Format::Natural:: \
   -E 'use DateTime::Format::Natural; 
       my $dt = DateTime::Format::Natural->new->parse_datetime("tomorrow"); 
       say "tomorrow is $dt";'

This works, esp. it adds all DateTime/Format/Natural/... modules to natural.exe
(use "unzip -l natural.exe" to verify). Note the "-u" option as something
requires Unicode support (which can't be auto-detected); without "-u", running
natural.exe fails with "Can't locate utf8_heavy.pl ...".

Cheers, Roderich


Reply via email to