[libclass-tiny-perl] 07/11: Minor optimization of import()

gregor herrmann gregoa at debian.org
Sun May 31 14:03:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to annotated tag release-0.006
in repository libclass-tiny-perl.

commit 20549c0bead6b4ebc0daabb3d893a74de5aec335
Author: David Golden <dagolden at cpan.org>
Date:   Thu Sep 5 06:53:36 2013 -0400

    Minor optimization of import()
    
    Fixes issue #6
---
 lib/Class/Tiny.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Class/Tiny.pm b/lib/Class/Tiny.pm
index 694cd9f..1ef714d 100644
--- a/lib/Class/Tiny.pm
+++ b/lib/Class/Tiny.pm
@@ -18,7 +18,7 @@ sub import {
     my $class = shift;
     my $pkg   = caller;
     $class->prepare_class($pkg);
-    $class->create_attributes( $pkg, @_ );
+    $class->create_attributes( $pkg, @_ ) if @_;
 }
 
 sub prepare_class {

-- 
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