]> git.vpit.fr Git - perl/modules/Acme-CPANAuthors-You-re_using.git/commitdiff
Make register check $SKIP directly
authorVincent Pit <vince@profvince.com>
Sun, 3 Oct 2010 11:56:00 +0000 (13:56 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 3 Oct 2010 11:56:00 +0000 (13:56 +0200)
Otherwise calling it as a class method would not do anything.

lib/Acme/CPANAuthors/You/re_using.pm

index 7c08bb6153724ef2519e963626f0adba2528dce2..9f5a8185f16dfbf0abfe2175203bbd9d7f8b2272 100644 (file)
@@ -48,8 +48,10 @@ This function is automatically called when you C<use> this module, unless you ha
 
 BEGIN { require Acme::CPANAuthors::Register; }
 
+our $SKIP;
+
 sub register {
- return if shift;
+ return if $SKIP;
 
  my %authors;
 
@@ -85,9 +87,7 @@ sub register {
  Acme::CPANAuthors::Register->import(%authors);
 }
 
-our $SKIP;
-
-BEGIN { register($SKIP) }
+BEGIN { register() }
 
 =head1 DEPENDENCIES