in reply to Perl debug. How do I find calling line number?

It sounds to me like Carp and its replacement for die, croak is what you really want here. croak dies "at the place of call" instead of within your module. The source code of Carp.pm should also tell you how to get the information about the line number out of perl. perldoc -f caller also tells you how to get this information yourself.

  • Comment on Re: Perl debug. How do I find calling line number?

Replies are listed 'Best First'.
Re^2: Perl debug. How do I find calling line number?
by tachyon (Chancellor) on Sep 26, 2004 at 11:39 UTC

    I particularly like the confess function of carp. It is just such a good name for what it does *. It captures both the angst and the deeply spiritual nature of debugging in a single word. Confess damnit :-)

    * dies with complete call stack trace

    cheers

    tachyon

Re^2: Perl debug. How do I find calling line number?
by Anonymous Monk on Feb 06, 2008 at 06:01 UTC
    Try this: http://www.perlmonks.org/?node=caller