summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-05-07 05:24:46 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-05-07 05:24:46 +0000
commit277ddfaf09c11f4f38a1c6f63c004bfe4d066e3d (patch)
treed8c73fb562db76e850bec9a30c6e9b372b93bf45
parent7766e6860946c0b410312024149e997981ca596c (diff)
downloadperl-277ddfaf09c11f4f38a1c6f63c004bfe4d066e3d.tar.gz
note about undocumented caller() return value (from M.J.T. Guy);
yet another peek.t tweak p4raw-id: //depot/perl@6083
-rw-r--r--pod/perlfunc.pod3
-rw-r--r--t/lib/peek.t7
2 files changed, 7 insertions, 3 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 8e66e1b5f8..4e67506e26 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<eval>. 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<require> or C<use> statement, $evaltext contains the text of the
-C<eval EXPR> statement. In particular, for a C<eval BLOCK> statement,
+C<eval EXPR> statement. In particular, for an C<eval BLOCK> statement,
$filename is C<(eval)>, but $evaltext is undefined. (Note also that
each C<use> statement creates a C<require> frame inside an C<eval EXPR>)
+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 0b62802da9..255512fac5 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;