On 18/05/2011 21:37, Kenneth Wolcott wrote:
A colleague claims that he made no changes, code worked yesterday and
doesn't today.
He is not using OO Perl.
I have asked him for a small code snippet that reproduces the error (I'm
sure he is unwilling to show the entire code!).
We have rules requiring the standard use of "use strict" and "use
warnings" in all our Perl scripts.
We use Perl on Windows, Linux and Solaris (all his scripts are supposed to
run without modification on Linux and Windows).
He claims this: "use strict; use warnings; use XML::XPath;"
Trying to get value for:
$ha = $xPath->findnodes('//job');
Error:
Can't call method "findnodes" on unblessed reference at<file_name> line
<line_number>.
Output from Data::Dumper follows:
$VAR1 = {
'object' => [
{
'objectId' => 'job-21461',
'job' => {
'priority' => 'normal',
'status' => 'completed',
'outcome' => 'success',
'jobName' => 'DeleteBuilds-200911060000',
'jobId' =>
'21461',
'lastModifiedBy' => 'admin',
}
},
{
'objectId' => 'job-21473',
'job' => {
'priority' => 'normal',
'status' => 'completed',
'outcome' => 'success',
'jobName' => 'DeleteBuilds-200911070000',
'jobId' => '21473',
'lastModifiedBy' => 'admin',
}
},
]
}
I have read and reread this original post, and cannot understand it in
any way other than that asking for help to debug someone else's code
without sight of that code. Is that a correct reading of it or am I
wrong? Regardless, it is clear that my bullheaded response was
inappropriate, and most members of this List will realize that it was
out of character for me. I apologize to anyone who may have felt
personally aggrieved - especially the OP Ken - as well as the rest of
the members of the List.
My personal situation is that I am struggling with critical family
health issues, and the List is a welcome distraction from that stress.
But I did not realize that the quality of my posts had been so
compromised, and would have avoided responding if I had been aware. I
offer this as explanation rather than excuse, and hope it helps members
to understand my outburst.
Once again, my apologies and regards to all,
Rob
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/