Flaw in Attribute::Handlers 0.76
Arthur Bergman [Tue, 16 Apr 2002 11:58:45 +0000 (13:58 +0200)]
Message-Id: <8A74F82C-5120-11D6-AEA5-003065D64CBE@contiller.se>

p4raw-id: //depot/perl@15945

lib/Attribute/Handlers.pm

index 78acbdb..3afccd5 100644 (file)
@@ -192,13 +192,19 @@ sub _apply_handler_AH_ {
        return 1;
 }
 
-CHECK {
-       $global_phase++;
-       _resolve_lastattr;
-       _apply_handler_AH_($_,'CHECK') foreach @declarations;
-}
+{
+        no warnings 'void';
+        CHECK {
+               $global_phase++;
+               _resolve_lastattr;
+               _apply_handler_AH_($_,'CHECK') foreach @declarations;
+        }
 
-INIT { $global_phase++; _apply_handler_AH_($_,'INIT') foreach @declarations }
+        INIT {
+                $global_phase++;
+                _apply_handler_AH_($_,'INIT') foreach @declarations
+        }
+}
 
 END { $global_phase++; _apply_handler_AH_($_,'END') foreach @declarations }