[rt.cpan.org #106144] [Patch] Preload dependencies for File::BOM

[email protected] ("Shawn Laffan via RT")
Newsgroups perl.par
Message-ID <[email protected]>
Wed Jul 29 17:45:38 2015: Request 106144 was acted upon.
Transaction: Correspondence added by SLAFFAN
       Queue: Module-ScanDeps
     Subject: [Patch] Preload dependencies for File::BOM
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106144 >


Thanks Roderich.

The issue is that, without the additional encodings, a PAR packed executable fails in those locales that need them. An example from my use case is here: https://github.com/shawnlaffan/biodiverse/issues/506

The issue boils down to whether they should be implicitly loaded by Module::ScanDeps, or should be explicitly packaged in the pp call.



Regards,
Shawn.


On Wed Jul 29 11:10:31 2015, RSCHUPP wrote:
> > The patch was tested using the code below.  The file open is needed
> > to
> > trigger the loading of the extra modules under "pp -x".
> >
> > use File::BOM;
> > open my $fh, '<:via(File::BOM)', $0  #  just read ourselves
> >   or die "Cannot open own code via File::BOM\n";
> > $fh->close;
> 
> 'File/BOM.pm'      => [qw( Encode/Unicode.pm PerlIO/via.pm )],
> 
> is enough to make the code above work. No need to load a bunch of
> unrelated encodings.
> 
> Cheers, Roderich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.