From: Vincent Pit Date: Mon, 5 Jan 2009 11:03:06 +0000 (+0100) Subject: Rename CURRENT to HERE X-Git-Tag: v0.04~22 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=commitdiff_plain;h=b1705371d0b8be388540f125bde19d10e3e14ea8 Rename CURRENT to HERE --- diff --git a/Upper.xs b/Upper.xs index 4e2f45f..a400afd 100644 --- a/Upper.xs +++ b/Upper.xs @@ -545,7 +545,7 @@ PROTOTYPES: ENABLE BOOT: { HV *stash = gv_stashpv(__PACKAGE__, 1); - newCONSTSUB(stash, "CURRENT", newSViv(0)); + newCONSTSUB(stash, "HERE", newSViv(0)); } SV * diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index 3c641ac..ca8ecc9 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -142,7 +142,7 @@ C<$key> is ignored. Returns the level that currently represents the highest scope. -=head2 C +=head2 C The current level - i.e. C<0>. @@ -168,7 +168,7 @@ If C<$from> is omitted in any of those functions, the current level is used as t The functions 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 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 @@ -177,7 +177,7 @@ use base qw/Exporter/; our @EXPORT = (); our %EXPORT_TAGS = ( funcs => [ qw/reap localize localize_elem localize_delete/ ], - words => [ qw/TOP CURRENT UP DOWN SUB EVAL/ ], + words => [ qw/TOP HERE UP DOWN SUB EVAL/ ], ); 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 862d662..b1c2b17 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -7,7 +7,7 @@ use Test::More tests => 10; require Scope::Upper; -for (qw/reap localize localize_elem localize_delete TOP CURRENT UP DOWN SUB EVAL/) { +for (qw/reap localize localize_elem localize_delete TOP HERE UP DOWN SUB EVAL/) { eval { Scope::Upper->import($_) }; is($@, '', 'import ' . $_); } diff --git a/t/05-words.t b/t/05-words.t index 2376d35..751b464 100644 --- a/t/05-words.t +++ b/t/05-words.t @@ -7,17 +7,17 @@ use Test::More tests => 33; use Scope::Upper qw/:words/; -is CURRENT, 0, 'main : current'; -is TOP, 0, 'main : top'; -is UP, 0, 'main : up'; +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 SUB, undef, 'main : sub'; is EVAL, undef, 'main : eval'; { - is CURRENT, 0, '{ 1 } : current'; - is TOP, 1, '{ 1 } : top'; - is UP, 1, '{ 1 } : up'; + is HERE, 0, '{ 1 } : here'; + is TOP, 1, '{ 1 } : top'; + is UP, 1, '{ 1 } : up'; is DOWN, 0, '{ 1 } : down'; is DOWN(UP), 0, '{ 1 } : up then down'; is UP(DOWN), 1, '{ 1 } : down then up'; @@ -61,12 +61,12 @@ do { sub { eval q[ { - is CURRENT, 0, 'mixed : current'; - is TOP, 6, 'mixed : top'; - is SUB, 2, 'mixed : first sub'; + is HERE, 0, 'mixed : here'; + is TOP, 6, 'mixed : top'; + is SUB, 2, 'mixed : first sub'; is SUB(SUB), 2, 'mixed : still first sub'; is EVAL, 1, 'mixed : first eval'; - is EVAL(EVAL), 1, 'mixed : still first eval'; + is EVAL(EVAL), 1, 'mixed : still first eval'; is EVAL(UP(EVAL)), 4, 'mixed : second eval'; } ];