ev0lution has asked for the wisdom of the Perl Monks concerning the following question:
Can't locate object method "new" via package "XML::Writer" at /apollo/volume/software/application/artemis/bin/KapowStarter.pl line 371.
I'm implementing the code as a subroutine, but when I initially had it running locally as it's own script it was functioning just file. Here's the spot of code that is giving me the problems. FYI, I did load the module at the beginning of the script (use XML::Writer;) and it is installed. It seems that it is trying to find the 'new()' function within the XML::Writer module, but can't find it. No clue why not. Thanks in advance for the help!sub SQLtoXML { $log->debug("Attempting to pull from MySQL DB and write to XML.." . +"\n"); #Parameter being passed is the Source ID to check against the Databa +se and final directory for XML file. my $PassedSource = $_[0]; my $FinalDir = $_[1]; my $FileName = ""; #Set up temporary XML output file for XML::Writer my $output = IO::File->new(">output.xml"); #Initiate XML::Writer my $writer = XML::Writer->new(OUTPUT => $output);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error when creating a new instance of XML::Writer
by fishmonger (Chaplain) on Nov 08, 2012 at 21:06 UTC | |
|
Re: Error when creating a new instance of XML::Writer
by karlgoethebier (Abbot) on Nov 09, 2012 at 10:20 UTC | |
|
Re: Error when creating a new instance of XML::Writer
by bitingduck (Deacon) on Nov 09, 2012 at 06:57 UTC |