Mon Sep 16 16:49:13 2013: Request 88297 was acted upon.
Transaction: Correspondence added by NGLENN
Queue: PAR-Packer
Subject: -M crashes pp if option contains backslashes
Broken in: 1.014
Severity: (no value)
Owner: RSCHUPP
Requestors: [email protected]
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88297 >
> Maybe we could check whether -M was given an absolute pathname
> and at least print a warning.
This seems to do the trick:
--- lib/PAR/PackerOLD.pm 2013-09-17 00:33:16.000000000 +0400
+++ lib/PAR/Packer.pm 2013-09-17 00:33:16.000000000 +0400
@@ -675,6 +675,9 @@
my (@modules, @data, @exclude);
foreach my $name (@{ $opt->{M} || [] }) {
+ if(File::Spec->file_name_is_absolute($name)){
+ $self->_warn('Absolute path used in -M option');
+ }
$self->_name2moddata($name, \@modules, \@data);
}
I don't know if $self->_warn is a good thing to do here, since it prints the
line number in Packer.pm, potentially making the user think that there's
something wrong with the module. Don't know if the message is the best either.