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

caller() returns wrong line on multi-line function call

by jh (Sexton)
on Sep 13, 2017 at 18:24 UTC ( #1199342=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    #!/usr/bin/perl -w
    use strict;
      %{{ A => 1, B => 2, C => 3 }}
  2. or download this
    Called from line 11; caller() reports line 11
    Called from line 15; caller() reports line 16
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    print "\n";
  4. or download this
        Called from line 22; caller() reports line 22 [args: A 1 D 4 C 3 E
    + 5 B 2]
        Called from line 23; caller() reports line 23 [args: HASH(0x974070
    *** Called from line 122; caller() reports line 124 [args: space_1 str
    *** Called from line 126; caller() reports line 129 [args: space_1 spa
    +ce_2 strings_are_scalar]
    *** Called from line 131; caller() reports line 134 [args: space_1 spa
    +ce_2 strings_are_scalar space_3 space_4]

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1199342]
Approved by beech
Front-paged by LanX
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-12-11 22:59 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (317 votes). Check out past polls.