Hi Mark, hi Steven,
Mark Dootson schrieb:
The change I just tested was
my @libs = (); for my $ilib ( @INC ) { $ilib =~ s/\\$/\\\\/;
push(@libs, qq(-I\"$ilib\") ); }
I chose this route purely to be consistent with the implementation in
Module::ScanDeps::DataFeed. (Which is not explicitly MSWin specific).
The thinking here is that fixes for problems that are exposed by
usage of either module can be applied to both.
I chose an implementation without 'map' as I have an unreasonable
antipathy towards it :-)
However, as all suggestions will 'work' for the specific case in
question. I have no preference.
Steffen, as maintainer the choice is yours. I'll test build and patch
whichever method decided upon.
I'm really pretty ambivalent to the coding style. PAR is a mess anyway.
As for which regular expression to use, I'd think the following:
a) Don't mix \ and / path separators if possible.
b) Try not to change any more than necessary.
c) Try not to change semantics in any appreciable context. (I.e. in case
code relies on appending a file name without File::Spec, don't make them
point at PAR even if it's really their bug.)
Basically, using the regex you propose above, a, b, and c should be
satisfied because the path ends up being the same after being passed
through the shell as it was before.
For info, the history of this begins with PAR::Packer 0.960 where the
implementation was: my @libs = (map {"-I$_"} @INC);
That was my fault. Sigh. The whole install-parl-as-module approach had
proved to require more yucky workarounds than I had anticipated.
Thanks for your work!
Steffen