Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Monday April 16, 2007
06:17 AM

Perl6::Caller

[ #33001 ]

Why isn't there a Perl6::Caller on the CPAN? See the caller function in Synopsis 6 for an idea of what I want:

use Perl6::Caller;

print "In ",           Caller->sub,
      " called from ", Caller->file,
      " line ",        Caller->line, "\n";

Of course, you'd want to support everything that caller does, including support for how many levels back you want to go. Shouldn't be too hard to write.

You should even be able to optionally override CORE::caller:

$ perl -le 'print prototype "CORE::caller"'
;$

(prototype returns 'undef' if the builtin is not overrideable.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.