I know I going on about this, but it's still annoying... OK, I know why the error is occuring (and I am using PPM v. 1.1.2). If the PPM::read_href, when trying to read a HEADer, gets a success the file will be attempted downloaded and parsed by XML::Parser. Unfortunately, requesting the header information for, for example http://www.activestate.com/Packages/nonexisting.ppd, yields a success! Then PPM tries to download and parse the file and the XML::Parser dies. So what can you do? Well, I have a hack. I am not proud of it, because it generates extra trafic and takes more processing time (the same file is process twice by XML::Parser etc.) but it is a quick'n'dirty hack, that works, at least to my knowledge. I'll try to get the time to make a prettier solution next week (not till friday though). In the PPM.pm module you could make a few changes: 1. In the sub readPPDfile change the line my @parsed = @{ $parser->parse( $CONTENTS ) }; with my @parsed; eval { @parsed = @{ $parser->parse( $CONTENTS ) }; }; return undef if ($@); 2. In the sub valid_URL_or_file change the line return 1 if ($File =~ m@^...*://@i && defined read_href("href" => $File, "request" => 'HEAD')); with if ($File =~ m@^...*://@i) { my $CONTENTS = read_href("href" => $File, "request" => 'GET'); if (defined $CONTENTS) { $CONTENTS =~ s/&(?!\w+;)/&/go; my $parser = new XML::Parser( Style => 'Objects', Pkg => 'XML::PPD' ); my @parsed; eval { @parsed = @{ $parser->parse( $CONTENTS ) }; }; return 0 if ($@); return 1; } } Not the prettiest solution, but hey, now PPM doesn't die and goes on searching through all the repositories if it cannot find a PPD file :-) /Henning --- You are currently subscribed to perl-win32-users as: [[email protected]] To unsubscribe, forward this message to [EMAIL PROTECTED] For non-automated Mailing List support, send email to [EMAIL PROTECTED]
Hack Solution (was: PPM and 'mismatched tag at line 9, column 2...')
Henning Michael M�ller-Nielsen Sun, 07 May 2000 09:40:46 -0700
- PPM and 'mismatched tag at line 9, column 2... Henning Michael M�ller-Nielsen
- Re: PPM and 'mismatched tag at line 9,... Cameron Dorey
- RE: PPM and 'mismatched tag at line 9,... Charles Maier
- RE: PPM and 'mismatched tag at lin... Joseph P. Discenza
- Re: PPM and 'mismatched tag at lin... Cameron Dorey
- Re: PPM and 'mismatched tag at lin... Tim Hammerquist
- Re: PPM and 'mismatched tag at line 9,... Jan Dubois
- Re: PPM and 'mismatched tag at lin... Henning Michael M�ller-Nielsen
- Re: PPM and 'mismatched tag at... Jan Dubois
- Re: PPM and 'mismatched ta... Henning Michael M�ller-Nielsen
- PPM Works! (was Re: H... Henning Michael M�ller-Nielsen
- PPM Works! (was R... Aaron
