Slash Boxes
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 ]

Journal of rafael (2125)

Thursday January 30, 2003
09:01 AM


[ #10295 ]
Autrijus Tang has just uploaded Devel::Hints on CPAN. I was about to code this module myself, but Autrijus did a better job (and obviously he did it faster.) I was going to use Inline::C instead of XS, and I didn't thought about adding an optional call stack level parameter to the cop_* functions. (More on that topic in the next P5P summary.)
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • A neat hammer, but I don't see what the nails for it are. I'd love to see some examples that show how this can help the average programmer. Or is it a module that only an internals-lovin' programmer could love?


    • Here's the nail I wrote the hammer for, a CORE::GLOBAL::open() overrider that respects the 'use open' pragma in the caller's block:

      sub open (*;@) {
              # ...
              my $ret = CORE::open($fh, $mode, $file) or return 0;
              # ...
              my $binmode = Devel::Hints::cop_io(1);
              $binmode = (split(/\x00/, $binmode))[($mode =~ />/) ? 1 : 0];
              binmode($fh, $binmode) if