Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by srlbharu (Acolyte)
on Mar 07, 2013 at 09:04 UTC ( [id://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

Replies are listed 'Best First'.
Re^3: Setting break point for particular condition in the subroutine
by rjt (Curate) 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 (Saint) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1022172]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-24 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found