Skip Menu |

This queue is for tickets about the HTML-Parser CPAN distribution.

Report information
The Basics
Id: 49434
Status: resolved
Priority: 0/
Queue: HTML-Parser

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

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



Subject: Filename with initial space as argument to parse_file() won't read file contents
A simple code like this doesn't work: $tree->parse_file( ' abc/def.html' ); Notice the initial space in the filename. This is because of a 2-arg open in sub parse_file in Parser.pm. open(F, $file) || return undef; should be changed to: open(F, "<", $file) || return undef; Manually opening the file with a 3-arg open and using the filehandle instead of the filename as parameter to parse_file() works.
Ok, I've now made HTML::Parser use 3-arg open. Will appear in v3.64.