Discussion:
[rt.cpan.org #120041] --exclude gets confused by missing modules
(too old to reply)
Neubauer, Ralf via RT
2017-01-30 14:38:28 UTC
Permalink
Mon Jan 30 09:38:26 2017: Request 120041 was acted upon.
Transaction: Ticket created by ***@wido.bv.aok.de
Queue: PAR-Packer
Subject: --exclude gets confused by missing modules
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@wido.bv.aok.de
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=120041 >


Hi,

C:\Users\NEU\Desktop>copy con simple.pl
exit 0;
^Z
1 Datei(en) kopiert.

C:\Users\NEU\Desktop>pp simple.pl

C:\Users\NEU\Desktop>pp simple.pl --exclude DBD::Pg

C:\Users\NEU\Desktop>pp simple.pl --exclude DBD::PgPP
Odd number of elements in hash assignment at c:/strawberry-5.24.0.1-64/perl/site/lib/PAR/Packer.pm line 729.
Odd number of elements in hash assignment at c:/strawberry-5.24.0.1-64/perl/site/lib/PAR/Packer.pm line 783.

C:\Users\NEU\Desktop>pp simple.pl --exclude DBD::PgPP --exclude Made::Up

C:\Users\NEU\Desktop>


Line 729:
my %skip = map { Module::ScanDeps::_find_in_inc($_), 1 } @exclude;

Line 783:
%skip = map { Module::ScanDeps::_find_in_inc($_), 1 } @exclude;


It should be allowed to --exclude packages that are not installed. It is useful to be able to write general scripts that don't include a module, regardless if it is installed or not. At least it shouldn't deactivate the other excludes (silently, if the number of uninstalled excludes is even).

Ralf
Roderich Schupp via RT
2017-01-30 18:07:54 UTC
Permalink
Mon Jan 30 13:07:43 2017: Request 120041 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: --exclude gets confused by missing modules
Broken in: (no value)
Severity: (no value)
Owner: RSCHUPP
Requestors: ***@wido.bv.aok.de
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=120041 >
Post by Neubauer, Ralf via RT
It should be allowed to --exclude packages that are not installed. It
Agreed :)
Post by Neubauer, Ralf via RT
C:\Users\NEU\Desktop>pp simple.pl --exclude DBD::PgPP
Odd number of elements in hash assignment at c:/strawberry-5.24.0.1-
64/perl/site/lib/PAR/Packer.pm line 729.
This error message puzzled me for a moment, I would have expected
"Use of uninitialized value in list assignment" when _find_in_inc can't find anything.
But... it's the context, stupid! Anyway, fixed on GitHub, will be in the next release.

Cheers, Roderich

Loading...