Roderich Schupp via RT
2013-09-02 13:04:15 UTC
Mon Sep 02 09:04:14 2013: Request 88297 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: -M crashes pp if option contains backslashes
Broken in: 1.014
Severity: (no value)
Owner: RSCHUPP
Requestors: ***@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88297 >
I can reproduce the failure, but this command is kinda pointless:
it would result in path\to\my\Lib.pm being packed as module path::to::my::Lib
which is probably not want you want. And if you wanted it,
why not say -M path::to::my::Lib?
Also it's very bad style to modify the parameters ($in in this case)
of a function (except when it's to provide a default value).
The formulation in the original code is also lacking, though:
addString and addFile already return an Archive::Zip::Member object,
so why not use this to set compression options etc.
I applied the attached fix instead, will be in the next release of PAR::Packer.
Cheers, Roderich
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: -M crashes pp if option contains backslashes
Broken in: 1.014
Severity: (no value)
Owner: RSCHUPP
Requestors: ***@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=88297 >
I can reproduce the failure, but this command is kinda pointless:
it would result in path\to\my\Lib.pm being packed as module path::to::my::Lib
which is probably not want you want. And if you wanted it,
why not say -M path::to::my::Lib?
... Then when it
called $zip->member($in), the member with the given name didn't exist.
I'm including a patch to fix this
Your patch only pampers over the problem.called $zip->member($in), the member with the given name didn't exist.
I'm including a patch to fix this
Also it's very bad style to modify the parameters ($in in this case)
of a function (except when it's to provide a default value).
The formulation in the original code is also lacking, though:
addString and addFile already return an Archive::Zip::Member object,
so why not use this to set compression options etc.
I applied the attached fix instead, will be in the next release of PAR::Packer.
Cheers, Roderich