From: Gurusamy Sarathy Date: Sun, 7 May 2000 05:24:46 +0000 (+0000) Subject: note about undocumented caller() return value (from M.J.T. Guy); X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=277ddfaf09c11f4f38a1c6f63c004bfe4d066e3d;p=p5sagit%2Fp5-mst-13.2.git note about undocumented caller() return value (from M.J.T. Guy); yet another peek.t tweak p4raw-id: //depot/perl@6083 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 8e66e1b..4e67506 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -539,9 +539,10 @@ Here $subroutine may be C<(eval)> if the frame is not a subroutine call, but an C. In such a case additional elements $evaltext and C<$is_require> are set: C<$is_require> is true if the frame is created by a C or C statement, $evaltext contains the text of the -C statement. In particular, for a C statement, +C statement. In particular, for an C statement, $filename is C<(eval)>, but $evaltext is undefined. (Note also that each C statement creates a C frame inside an C) +frame. C<$hasargs> is true if a new instance of C<@_> was set up for the frame. C<$hints> and C<$bitmask> contain pragmatic hints that the caller was compiled with. The C<$hints> and C<$bitmask> values are subject to change between versions of Perl, and are not meant for external use. diff --git a/t/lib/peek.t b/t/lib/peek.t index 0b62802..255512f 100644 --- a/t/lib/peek.t +++ b/t/lib/peek.t @@ -15,12 +15,15 @@ use Devel::Peek; print "1..17\n"; our $DEBUG = 0; +open(SAVERR, ">&STDERR") or die "Can't dup STDERR: $!"; sub do_test { my $pattern = pop; - if (open(STDERR,">peek$$")) { + if (open(OUT,">peek$$")) { + open(STDERR, ">&OUT") or die "Can't dup OUT: $!"; Dump($_[1]); - close(STDERR); + open(STDERR, ">&SAVERR") or die "Can't restore STDERR: $!"; + close(OUT); if (open(IN, "peek$$")) { local $/; $pattern =~ s/\$ADDR/0x[[:xdigit:]]+/g;