XML::Writer upgrade causes fatal error

I recently upgraded a non-public FreshPorts server from FreeBSD 8.2 to FreeBSD 8.4 using freebsd-update(8). As part of that process, I refreshed all the installed third-party applications via portupgrade(1).

After this process was completed, I started noticing these errors:

Use of uninitialized value $newOutput in string eq at 
/usr/local/lib/perl5/site_perl/5.12/XML/Writer.pm line 473, <> line 109.

What port installed that?

$ pkg_info -W /usr/local/lib/perl5/site_perl/5.12/XML/Writer.pm
/usr/local/lib/perl5/site_perl/5.12/XML/Writer.pm was installed by package p5-XML-Writer-0.623

After commenting out a lot of the code, I tracked the problem down to this invocation of the XML::Writer object:

        my ($writer) = new XML::Writer( DATA_INDENT => 4,
                                        DATA_MODE   => 1 );

Reading perldoc XML::Writer, I discovered the OUTPUT parameter. I altered the above declaration to:

        my $output = '';
        my ($writer) = new XML::Writer( OUTPUT      => $output,
                                        DATA_INDENT => 4,
                                        DATA_MODE   => 1 );

With that change, the error message went away. Why it was occurring only with the new version of the package, I do not know.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top