Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Why my code working...why my code is not working...

by prashantktyagi (Scribe)
on Nov 12, 2012 at 06:34 UTC ( #1003371=perlquestion: print w/ replies, xml ) Need Help??
prashantktyagi has asked for the wisdom of the Perl Monks concerning the following question:

Hi, As my title describes. I had added one code to my existing script.
It happened to work on same config test machine but not working in production.
my $patch_node = ($self->get_control->get_root->findnodes( '//package/ +patch' ))[0]; my $patch_desc = $patch_node->findvalue('description'); my $patch_name = $patch_node->findvalue('@name'); my $patch_id = $patch_node->findvalue('@patchcode' ); my $target_version = $patch_node->findvalue('@target_version' );
I am able to read patch_name,patch_id ,patch_desc but not target_version how ever these all are part of one tag.
How can I debug this behavior? Perl -v- 5.8.1
use XML::LibXML;
use XML::LibXSLT;

Comment on Why my code working...why my code is not working...
Download Code
Re: Why my code working...why my code is not working...
by NetWallah (Abbot) on Nov 12, 2012 at 06:48 UTC
    How can I debug this behavior?
    Um ... Use the built-in perl debugger -?

    BTW "not working" is not a particularly descriptive problem statement.

                 "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius

Re: Why my code working...why my code is not working...
by Anonymous Monk on Nov 12, 2012 at 10:35 UTC
Re: Why my code working...why my code is not working...
by marto (Bishop) on Nov 12, 2012 at 10:39 UTC

    As a side note, your title "Why my code working...why my code is not working..." is repetitive and unhelpful. A link to How do I compose an effective node title? is displayed every time you post. Please read and understand it.

Re: Why my code working...why my code is not working...
by Old_Gray_Bear (Bishop) on Nov 12, 2012 at 16:17 UTC
    You said: "It happened to work on same config test machine but not working in production." and "How can I debug this behavior?"
    1. Determine the difference(s) between your Production machine and your test machine.
    2. Correct the setup of the test machine to accurately reflect the Production world.
    3. Debug your code on the test machine using your normal tools.
    4. Deploy to production and observe the results.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: Why my code working...why my code is not working...
by prashantktyagi (Scribe) on Nov 15, 2012 at 10:04 UTC
    Hi monks...Thanks all for the support...
    it was a configuration problem. sorry for making noises here..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1003371]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-12-28 20:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls