diff options
author | Wolfgang Laun <Wolfgang.Laun@alcatel.at> | 2001-12-21 15:02:01 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-21 13:43:53 +0000 |
commit | 8e011b7da72d2334d6a86247cbfa607bb6897514 (patch) | |
tree | 1800f939c9c42ee50e9e349b7081f018f5a3ef86 /ext/B | |
parent | e53790c1de51b5453ccdee177a995225bf5154c2 (diff) | |
download | perl-8e011b7da72d2334d6a86247cbfa607bb6897514.tar.gz |
ext/B/B/Xref.pm adding "our" recognition
Message-ID: <3C2332C9.7CFED5F2@alcatel.at>
p4raw-id: //depot/perl@13831
Diffstat (limited to 'ext/B')
-rw-r--r-- | ext/B/B/Xref.pm | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ext/B/B/Xref.pm b/ext/B/B/Xref.pm index 1731b86ac7..d0cddbf371 100644 --- a/ext/B/B/Xref.pm +++ b/ext/B/B/Xref.pm @@ -89,7 +89,7 @@ Malcolm Beattie, mbeattie@sable.ox.ac.uk. use strict; use Config; use B qw(peekop class comppadlist main_start svref_2object walksymtable - OPpLVAL_INTRO SVf_POK + OPpLVAL_INTRO SVf_POK OPpOUR_INTRO ); sub UNKNOWN { ["?", "?", "?"] } @@ -230,16 +230,16 @@ sub pp_padav { pp_padsv(@_) } sub pp_padhv { pp_padsv(@_) } sub deref { - my ($var, $as) = @_; + my ($op, $var, $as) = @_; $var->[1] = $as . $var->[1]; - process($var, "used"); + process($var, $op->private & OPpOUR_INTRO ? "intro" : "used"); } -sub pp_rv2cv { deref($top, "&"); } -sub pp_rv2hv { deref($top, "%"); } -sub pp_rv2sv { deref($top, "\$"); } -sub pp_rv2av { deref($top, "\@"); } -sub pp_rv2gv { deref($top, "*"); } +sub pp_rv2cv { deref(shift, $top, "&"); } +sub pp_rv2hv { deref(shift, $top, "%"); } +sub pp_rv2sv { deref(shift, $top, "\$"); } +sub pp_rv2av { deref(shift, $top, "\@"); } +sub pp_rv2gv { deref(shift, $top, "*"); } sub pp_gvsv { my $op = shift; @@ -253,7 +253,8 @@ sub pp_gvsv { $gv = $op->gv; $top = [$gv->STASH->NAME, '$', $gv->NAME]; } - process($top, $op->private & OPpLVAL_INTRO ? "intro" : "used"); + process($top, $op->private & OPpLVAL_INTRO || + $op->private & OPpOUR_INTRO ? "intro" : "used"); } sub pp_gv { |