Skip Menu |

This queue is for tickets about the PodToHTML CPAN distribution.

Report information
The Basics
Id: 2484
Status: resolved
Worked: 5 min
Priority: 0/
Queue: PodToHTML

People
Owner: Nobody in particular
Requestors: mark [...] summersault.com
Cc:
AdminCc:

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



Subject: make test fails with IO::File error
See several examples from the CPAN testers results: http://testers.cpan.org/search?request=dist&dist=PodToHTML It looks like this: t/script........Can't locate object method "new" via package "IO::File" (perhaps you forgot to load "IO::File"?) at /usr/src/. Pod::HTML_Elements::write_index('Pod::HTML_Elements=HASH(0x8123ea0)') called at podtohtml line 122 t/script........NOK 1# Test 1 got: '65280' (t/script.t at line 8) ##### Gee, that turned out to be really to fix. We just need to add a statement to require IO::File if it's needed. Here's a patch: --- HTML_Elements.pm.orig Fri May 2 19:08:49 2003 +++ HTML_Elements.pm Fri May 2 19:10:27 2003 @@ -374,8 +374,9 @@ { my $parser = shift; my $ifile = $parser->{'Index'}; - if (defined $ifile) - {my $fh = IO::File->new(">$ifile"); + if (defined $ifile) { + require IO::File; + my $fh = IO::File->new(">$ifile"); if ($fh) { my $html = HTML::Element->new('html'); ###################
[guest - Fri May 2 20:12:40 2003]: Fixed this a different way in 0.05 open(my $fh,...) $parser->{'Index'}; Show quoted text
> - if (defined $ifile) > - {my $fh = IO::File->new(">$ifile"); > + if (defined $ifile) { > + require IO::File; > + my $fh = IO::File->new(">$ifile"); > if ($fh) > { > my $html = HTML::Element->new('html'); > ###################