Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Setting break point for particular condition in the subroutine

by srlbharu (Acolyte)
on Mar 07, 2013 at 09:04 UTC ( #1022172=note: print w/ replies, xml ) Need Help??


in reply to Re: Setting break point for particular condition in the subroutine
in thread Setting break point for particular condition in the subroutine

This subroutine is called from other subroutine which is intern called from my perl script. So setting break point b 123 $cmd =~ /INITIAL/i throws error Line 118 not breakable. because my script does not have those many lines.

From the google docs I found the below statement b subname [condition] Can we use this in anyway?


Comment on Re^2: Setting break point for particular condition in the subroutine
Download Code
Re^3: Setting break point for particular condition in the subroutine
by rjt (Deacon) on Mar 07, 2013 at 10:43 UTC

    Yes, that's why you need to figure out the actual line number. "123" was just an example. You can determine the line number with l Engine::_Execute ... lines that are breakable will show with a colon (:) after the line number in the debugger. Hence, if you see this:

    100 sub Engine::Execute 101 { 102 103: foreach (@commands) 104 { 105: $cmd = $_; 106: if($cmd =~ /INITIAL/i) 107 {

    ... then you would type b 106 $cmd =~ /INITIAL/i

    Again, these numbers are just examples. You need to determine the actual line number for yourself with l Engine::_Execute!

Re^3: Setting break point for particular condition in the subroutine
by LanX (Canon) on Mar 07, 2013 at 10:57 UTC
    > From the google docs I found the below statement b subname [condition] Can we use this in anyway?

    No and I already showed you two ways to solve this. Why didn't you try?

    Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022172]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2014-07-31 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (253 votes), past polls