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');
###################