Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 9511
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: barbie [...] missbarbell.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.050_04
Fixed in: (no value)



Subject: dslip bug with ';' in description
When starting up CPANPLUS (this is all versions of CPANPLUS or at least back to 0.048), the dslip tree is created. Unfortunately in 03modlist.data, there is now a distribution which has a ';' in its description text. This breaks the tree creation. The file in question is CPANPLUS/Internals/Source.pm. The following patch is a quick fix to ensure it doesn't fail in the eval block. As a suggestion is there a reason a temporary file isn't created (minus the text above the 'package' line) and that 'require'd to access the $CPAN::Modulelist::cols and $CPAN::Modulelist::data variables more directly?
--- C:\wip\diffs\CPANPLUS-0.050\CPANPLUS-0.050_04/lib/CPANPLUS/Internals/Source.pm Sun Dec 26 12:56:40 2004 +++ C:\wip\diffs\CPANPLUS-0.050\CPANPLUS-0.050_04-barbie/lib/CPANPLUS/Internals/Source.pm Fri Jan 7 16:45:56 2005 @@ -883,7 +883,11 @@ $in =~ s|.+}\s+(\$(?:CPAN::Modulelist::)?cols)|$1|s; ### split '$cols' and '$data' into 2 variables ### - my ($ds_one, $ds_two) = split ';', $in, 2; +# my ($ds_one, $ds_two) = split ';', $in, 2; + # Barbie - 03/11/2004 + # - fix for ';' in a distribution comment + my ($ds_one, @ds_two) = split ';', $in; + my $ds_two = join(";",@ds_two); ### eval them into existance ### ### still not too fond of this solution - kane ###
From: Barbie
Ignore above patch, this one works better.
--- C:\wip\diffs\CPANPLUS-0.050\CPANPLUS-0.050_04/lib/CPANPLUS/Internals/Source.pm Sun Dec 26 12:56:40 2004 +++ C:\wip\diffs\CPANPLUS-0.050\CPANPLUS-0.050_04-barbie/lib/CPANPLUS/Internals/Source.pm Mon Jan 10 11:36:29 2005 @@ -880,10 +880,11 @@ ### $cols = [....] ### and newer versions say: ### $CPANPLUS::Modulelist::cols = [...] - $in =~ s|.+}\s+(\$(?:CPAN::Modulelist::)?cols)|$1|s; - ### split '$cols' and '$data' into 2 variables ### - my ($ds_one, $ds_two) = split ';', $in, 2; + my ($ds_one, $ds_two) = ($in =~ m|.+}\s+ + (\$(?:CPAN::Modulelist::)?cols.*?) + (\$(?:CPAN::Modulelist::)?data.*) + |sx; ### eval them into existance ### ### still not too fond of this solution - kane ###
[BARBIE - Mon Jan 10 06:45:37 2005]: Show quoted text
> Ignore above patch, this one works better.
Thanks, applied with some tweaks to make it compile, as 11799