Skip Menu |

This queue is for tickets about the PPM CPAN distribution.

Report information
The Basics
Id: 21871
Status: open
Priority: 0/
Queue: PPM

People
Owner: Nobody in particular
Requestors: sisyphus1 [...] optusnet.com.au
Cc:
AdminCc:

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



Subject: ppd files on ActiveState break this version of PPM
Date: Tue, 3 Oct 2006 22:40:03 +1000
To: <bug-PPM [...] rt.cpan.org>
From: "Sisyphus" <sisyphus1 [...] optusnet.com.au>
This version of PPM cannot handle the ppd files currently on ActiveState: D:\>ppm search Math::FFT Unknown element 'PROVIDE' found inside of IMPLEMENTATION. at D:/perl58_M/site/5.8.8/lib/PPM.pm line 1537. D:\>ppm install Math::FFT Installing package 'Math-FFT'... Element 'IMPLEMENTATION' cannot contain a child element 'PROVIDE' at D:/perl58_M/site/5.8.8/lib/PPM.pm line 1658. Can't locate object method "rvalidate" via package "PPM::XML::PPD::PROVIDE" at D:/perl58_M/site/5.8.8/lib/PPM/XML/ValidatingElement.pm line 38. Cheers, Rob
From: SISYPHUS [...] cpan.org
On Tue Oct 03 08:44:58 2006, sisyphus1@optusnet.com.au wrote: Show quoted text
> This version of PPM cannot handle the ppd files currently on
ActiveState: Show quoted text
>
Attached are 2 patches (written by Randy Kobes) that fix the problem.
--- lib/PPM/XML/PPD.pm.orig 2006-10-03 16:16:37.000000000 -0500 +++ lib/PPM/XML/PPD.pm 2006-10-03 16:20:53.000000000 -0500 @@ -23,7 +23,7 @@ '%LANGUAGE::', '%LICENSE::', '%OS::', '%OSVERSION::', '%PERLCORE::', '%PROCESSOR::', '%CODEBASE::', '%INSTALL::', '%UNINSTALL::', - '%ARCHITECTURE::', + '%ARCHITECTURE::', '%PROVIDE::', ] ); Exporter::export_ok_tags( 'elements' ); @@ -34,7 +34,8 @@ @ISA = qw( PPM::XML::ValidatingElement ); @oattrs = qw( VERSION ); @rattrs = qw( NAME ); -@okids = qw( ABSTRACT AUTHOR IMPLEMENTATION LICENSE TITLE INSTALL UNINSTALL ); +@okids = qw( ABSTRACT AUTHOR IMPLEMENTATION LICENSE + TITLE INSTALL UNINSTALL PROVIDE); ############################################################################### # PPD Element: TITLE @@ -55,6 +56,14 @@ @ISA = qw( PPM::XML::ValidatingElement ); ############################################################################### +# PPD Element: PROVIDE +############################################################################### +package PPM::XML::PPD::PROVIDE; +@ISA = qw( PPM::XML::ValidatingElement ); +@oattrs = qw( VERSION ); +@rattrs = qw( NAME ); + +############################################################################### # PPD Element: LICENSE ############################################################################### package PPM::XML::PPD::LICENSE; @@ -67,7 +76,7 @@ package PPM::XML::PPD::IMPLEMENTATION; @ISA = qw( PPM::XML::ValidatingElement ); @okids = qw( DEPENDENCY INSTALL LANGUAGE OS OSVERSION PERLCORE PROCESSOR - UNINSTALL ARCHITECTURE ); + UNINSTALL ARCHITECTURE PROVIDE); @rkids = qw( CODEBASE ); ###############################################################################
--- lib/PPM.pm.orig 2006-10-03 16:14:02.000000000 -0500 +++ lib/PPM.pm 2006-10-03 16:24:52.000000000 -0500 @@ -1492,6 +1492,11 @@ # Dependencies in old PPDs might not have version info. $ImplDepend{$elem->{NAME}} = (defined $elem->{VERSION} && $elem->{VERSION} ne "") ? $elem->{VERSION} : "0,0,0,0"; } + elsif ($elem_type eq 'PROVIDE') { + # Get the name of any provides we have out of our attributes. + # Provides in old PPDs might not have version info. + $ImplDepend{$elem->{NAME}} = (defined $elem->{VERSION} && $elem->{VERSION} ne "") ? $elem->{VERSION} : "0"; + } elsif ($elem_type eq 'LANGUAGE') { # Get the language out of our attributes (if we don't already have # the right one).