From: Vincent Pit Date: Fri, 16 Jan 2009 19:14:02 +0000 (+0100) Subject: Remove the non debugger-safe DOWN X-Git-Tag: v0.06~6 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=da0237ee151a65dff50933a7af535ea0541c2ac2;p=perl%2Fmodules%2FScope-Upper.git Remove the non debugger-safe DOWN --- diff --git a/Upper.xs b/Upper.xs index 73bf6e7..14923a6 100644 --- a/Upper.xs +++ b/Upper.xs @@ -744,19 +744,6 @@ CODE: OUTPUT: RETVAL -SV * -DOWN(...) -PROTOTYPE: ;$ -PREINIT: - I32 cxix; -CODE: - SU_GET_CONTEXT(0, 0); - if (++cxix > cxstack_ix) - cxix = cxstack_ix; - RETVAL = newSViv(cxix); -OUTPUT: - RETVAL - void SUB(...) PROTOTYPE: ;$ diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index 5156015..ffd3c75 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -98,10 +98,6 @@ The current level. The level of the scope just above C<$from>. -=head2 C - -The level of the scope just below C<$from>. - =head2 C The level of the closest subroutine context above C<$from>. @@ -224,7 +220,7 @@ will righteously set C<$num> to C<26>. The functions L, L, L, L, L and L are only exported on request, either individually or by the tags C<':funcs'> and C<':all'>. -Same goes for the words L, L, L, L, L, L and L that are only exported on request, individually or by the tags C<':words'> and C<':all'>. +Same goes for the words L, L, L, L, L and L that are only exported on request, individually or by the tags C<':words'> and C<':all'>. =cut @@ -233,7 +229,7 @@ use base qw/Exporter/; our @EXPORT = (); our %EXPORT_TAGS = ( funcs => [ qw/reap localize localize_elem localize_delete unwind want_at/ ], - words => [ qw/TOP HERE UP DOWN SUB EVAL CALLER/ ], + words => [ qw/TOP HERE UP SUB EVAL CALLER/ ], ); our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; $EXPORT_TAGS{'all'} = [ @EXPORT_OK ]; diff --git a/t/01-import.t b/t/01-import.t index 76452a0..fe4f1c5 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,11 +3,11 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 12; require Scope::Upper; -for (qw/reap localize localize_elem localize_delete unwind want_at TOP HERE UP DOWN SUB EVAL CALLER/) { +for (qw/reap localize localize_elem localize_delete unwind want_at TOP HERE UP SUB EVAL CALLER/) { eval { Scope::Upper->import($_) }; is($@, '', 'import ' . $_); } diff --git a/t/05-words.t b/t/05-words.t index 318581d..b1d1467 100644 --- a/t/05-words.t +++ b/t/05-words.t @@ -3,14 +3,13 @@ use strict; use warnings; -use Test::More tests => 46; +use Test::More tests => 42; use Scope::Upper qw/:words/; is HERE, 0, 'main : here'; is TOP, 0, 'main : top'; is UP, 0, 'main : up'; -is DOWN, 0, 'main : down'; is SUB, undef, 'main : sub'; is EVAL, undef, 'main : eval'; @@ -18,9 +17,6 @@ is EVAL, undef, 'main : eval'; is HERE, 1, '{ 1 } : here'; is TOP, 0, '{ 1 } : top'; is UP, 0, '{ 1 } : up'; - is DOWN, 1, '{ 1 } : down'; - is DOWN(UP), 1, '{ 1 } : up then down'; - is UP(DOWN), 0, '{ 1 } : down then up'; } do {