Skip Menu |

This queue is for tickets about the PAR-Dist CPAN distribution.

Report information
The Basics
Id: 26782
Status: resolved
Priority: 0/
Queue: PAR-Dist

People
Owner: Nobody in particular
Requestors: kane [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.21
Fixed in: (no value)



Subject: unable to use blib_to_par() more than once per process
Hi, i found a critical bug in PAR::Dist::blib_to_par; it uses a static variable[1] which means that once $dist is initialized, it will keep the same value for the rest of the process, making it impossible to create 2 different PAR files. A patch is attached to address the issue. Please be aware that this is a critical bug for CPANPLUS::Dist::PAR's par generation, so a bugfix release would be appreciated. Thanks for your time, Jos [1] http://www.perl.com/pub/a/2000/05/p5pdigest/ THISWEEK-20000521.html#my_x_if_0;_Trick
Subject: par-dist-static.diff
--- PAR/Dist.pm.org 2007-04-29 13:22:58.000000000 +0200 +++ PAR/Dist.pm 2007-04-29 13:24:08.000000000 +0200 @@ -137,9 +137,11 @@ my %args = @_; require Config; - + + ### don't use 'my $foo ... if ...' it creates a static variable! + my $dist; + $dist = File::Spec->rel2abs($args{dist}) if $args{dist}; my $path = $args{path}; - my $dist = File::Spec->rel2abs($args{dist}) if $args{dist}; my $name = $args{name}; my $version = $args{version}; my $suffix = $args{suffix} || "$Config::Config{archname}-$Config::Config{version}.par";
Hi Jos, thanks for the bug report. I applied your patch to the SVN repository. There will be a bugfix release soon, but I'm at work and don't have my gpg keys here. Best regards, Steffen
Hi Jos, thanks for the bug report. I applied your patch to the SVN repository. There will be a bugfix release soon, but I'm at work and don't have my gpg keys here. Best regards, Steffen
Hi Jos, thanks for the bug report. I applied your patch to the SVN repository. There will be a bugfix release soon, but I'm at work and don't have my gpg keys here. Best regards, Steffen