To: | bug-par [...] rt.cpan.org |
Subject: | Bug in PAR::Filter::Bleach.pm when used for modules (module loading failed) |
From: | Vincent LADEUIL <v.ladeuil [...] alplog.fr> |
Date: | Tue, 25 Oct 2005 18:04:48 +0200 |
Hi,
First, thanks for your wonderful job. I'll never say that enough.
Second, when used in the following
configuration :
- windows 2000 professional
- msys 1.0
- mimgw 4.1 with :
- w32api-3.2
- binutils-2.15.91
- gcc-core-3.4.2
- gcc-g++-3.4.2
- dmake-4.1pl1-win32
- perl 5.8.7
- PAR-0.89
PAR::Filter::Bleach works nicely for scripts.
But it fails for modules because the module loading does not end
as it should by returning a true value but instead ends by
returning the value of $@ which, as an empty string is considered
false.
The following patch corrects the problem for me.
Hope it helps, tell me if you need more informations or if I
should have write my patch differently.
Vincent
*** /home/vila/cpanw32/lib/PAR/Filter/Bleach.pm~ 2005-04-19 21:07:34.000000000 +0200
--- /home/vila/cpanw32/lib/PAR/Filter/Bleach.pm 2005-10-25 17:53:49.000000000 +0200
***************
*** 25,31 ****
$$ref = unpack("b*", $$ref);
$$ref =~ tr/01/ \t/;
$$ref =~ s/(.{9})/$1\n/g;
! $$ref = q($_=<<'';y;\r\n;;d;$_=pack'b*',$_;eval;$@&&die$@)."\n$$ref\n\n";
}
1;
--- 25,31 ----
$$ref = unpack("b*", $$ref);
$$ref =~ tr/01/ \t/;
$$ref =~ s/(.{9})/$1\n/g;
! $$ref = q($_=<<'';y;\r\n;;d;$_=pack'b*',$_;$_=eval;$@&&die$@;$_)."\n$$ref\n\n";
}
1;