On Wed, Oct 1, 2008 at 10:20 AM, Mark Dootson <[EMAIL PROTECTED]> wrote:
> Isn't the underlying problem, in this particular case, Perl 5.10 regex
> engine dependency on Tie/Hash/NamedCapture.pm ?
Ouch, missed that one. So Tie/Hash/NamedCapture.pm is something like
Errno.pm, i.e. require'd by the core whenever needed (in the case of
Errno.pm that means that the program references $!).
Problem is where to make that explicit. I just checked for Errno.pm,
but it isn't treated specially anwhere in Module::ScanDeps or PAR::Packer.
But it's always present as one of the "embedded" files in a pp-packed
executable. I looked at par.pl (where the "embeded" files are determined,
search for "# Write bundled module") and the closest thing to
an explicity list of "essential" modules is given in sub require_modules.
But Errno isn't mentioned there. I think it only gets included because
par.pl simply embeds anything it itself has loaded at this time.
And we get lucky wrt Errno.pm because par.pl has referenced $!
leading up to that point.
I propose to amend require_modules in par.pl with
require Errno;
eval { require Tie::Hash::NamedCapture };
(the latter only conditionally, because it isn't available before Perl 5.10).
Cheers, Roderich