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.
You say later that he uses XML::XPath. That is an object-oriented module.
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).
Hi Kenneth.
All of the above may or may not be a proper assessment of your
situation, but it has nothing to do with Perl. My assessment would be
that your manager isn't doing his job, but also that you are bringing a
personal conflict to a Perl list instead of to your manager. He is there
to resolve things like this, and you haven't told him the relevant facts.
He claims this: "use strict; use warnings; use XML::XPath;"
Until you have evidence otherwise, your colleague is telling the truth.
Trying to get value for:
$ha = $xPath->findnodes('//job');
You have shown no code for the derivation of $xPath, or the declaration of
$ha.
Error:
Can't call method "findnodes" on unblessed reference at<file_name> line
<line_number>.
Why are you hiding<line_number> from us when we have no code? That
also makes sense with the rest of your mail, which shows that whatever
you have dumped is unblessed.
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',
}
},
]
}
That looks fine, except that all you have printed is a hash of data. It
isn't blessed and so it isn't an object.
Please grow up and ask Perl questions. It looks to me as if you are as
silly as each other. I certainly wouldn't employ either of you.
I also wonder if you 'Kenneth Wolcott' and your friend are the same
person. Since your name sounds English you embarrass me: the vast
majority of Englishmen are far more professional than yourself.
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/