Hi Alvar,

Alvar Freude wrote:
> Getopt::Euclid reads the definition for the commandline parameters from
> POD in scripts and Modules.
> 
> For this, Getopt::Euclid reads the module and parses the POD.
> 
> This fails with PAR, because the modules are not found:
> 
>     my @caller = caller;
>     if ($caller[1] =~ m/[.]pm \z/xms) {
>         # Save module's POD...
>         open my $fh, '<', $caller[1] or croak ...
>         ...
> 

I wouldn't try to actually find the module file itself. In a future
version of PAR, those things might possible be loaded directly from memory.

A similar issue is discussed with Pod::Usage here:
http://par.perl.org/wiki/FAQ#Pod::Usage_breaks_in_pp-packaged_binary_executables

I'll assume you read the above FAQ for the following.
For Getopt::Euclid, the fix isn't as straightforward. At compile time,
when its import is called, the DATA file handles don't exist yet. Maybe
one could modify the usage of Getopt::Euclid like this:

use vars qw/%ARGV/;
require Getopt::Euclid;
Getopt::Euclid->import(\*DATA);

However, that requires changing the module itself.

Best regards,
Steffen

Reply via email to