[libclass-tiny-perl] 14/22: make import a NOP for subclasses
gregor herrmann
gregoa at debian.org
Sun May 31 14:03:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to annotated tag release-0.001
in repository libclass-tiny-perl.
commit 19ca51acf7acf1f2fe7580038d5c644f4291dea8
Author: David Golden <dagolden at cpan.org>
Date: Fri Aug 16 09:18:25 2013 -0400
make import a NOP for subclasses
---
lib/Class/Tiny.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/Class/Tiny.pm b/lib/Class/Tiny.pm
index fe62245..ceb6556 100644
--- a/lib/Class/Tiny.pm
+++ b/lib/Class/Tiny.pm
@@ -21,6 +21,7 @@ my %CLASS_ATTRIBUTES;
sub import {
no strict 'refs';
my $class = shift;
+ return unless $class eq __PACKAGE__; # NOP for subclasses
my $pkg = caller;
my @attr = @_;
$CLASS_ATTRIBUTES{$pkg} = { map { $_ => 1 } @attr };
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libclass-tiny-perl.git
More information about the Pkg-perl-cvs-commits
mailing list