Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: caller() returns wrong line on multi-line function call (blocks)

by LanX (Saint)
on Sep 14, 2017 at 13:17 UTC ( [id://1199391]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<2> print %{ ( do{ {A=>1} } ) }
    A1
    
  2. or download this
       print_calling_line( __LINE__,
                           do { A => 1, B => 2, C => 3 }
                         );
    
  3. or download this
       print_calling_line( __LINE__,
                           do { A => 1, B => 2, C => 3 },
    ...
                         );
    ...
    Called from line 27; caller() reports line 30
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-24 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found