Returns the level that currently represents the highest scope.
-=head2 C<CURRENT>
+=head2 C<HERE>
The current level - i.e. C<0>.
The functions L</reap>, L</localize>, L</localize_elem> and L</localize_delete> are only exported on request, either individually or by the tags C<':funcs'> and C<':all'>.
-Same goes for the words L</TOP>, L</CURRENT>, L</UP>, L</DOWN>, L</SUB> and L</EVAL> that are only exported on request, individually or by the tags C<':words'> and C<':all'>.
+Same goes for the words L</TOP>, L</HERE>, L</UP>, L</DOWN>, L</SUB> and L</EVAL> that are only exported on request, individually or by the tags C<':words'> and C<':all'>.
=cut
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 ];
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';
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';
}
];