summaryrefslogtreecommitdiff
path: root/lib/less.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/less.pm')
-rw-r--r--lib/less.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/less.pm b/lib/less.pm
index 970b97a80c..02ea30b9ae 100644
--- a/lib/less.pm
+++ b/lib/less.pm
@@ -14,6 +14,8 @@ sub _unpack_tags {
grep {defined} @_;
}
+sub stash_name { $_[0] }
+
sub of {
my $class = shift @_;
@@ -22,7 +24,7 @@ sub of {
my $hinthash = ( caller 0 )[10];
my %tags;
- @tags{ _unpack_tags( $hinthash->{$class} ) } = ();
+ @tags{ _unpack_tags( $hinthash->{ $class->stash_name } ) } = ();
if (@_) {
exists $tags{$_} and return !!1 for @_;
@@ -38,7 +40,7 @@ sub import {
@_ = 'please' if not @_;
my %tags;
- @tags{ _unpack_tags( @_, $^H{$class} ) } = ();
+ @tags{ _unpack_tags( @_, $^H{ $class->stash_name } ) } = ();
$^H{$class} = _pack_tags( keys %tags );
return;
@@ -54,14 +56,14 @@ sub unimport {
my $new = _pack_tags( keys %tags );
if ( not length $new ) {
- delete $^H{$class};
+ delete $^H{ $class->stash_name };
}
else {
- $^H{$class} = $new;
+ $^H{ $class->stash_name } = $new;
}
}
else {
- delete $^H{$class};
+ delete $^H{ $class->stash_name };
}
return;