enable default arguments by default
Lukas Mai [Fri, 22 Jun 2012 21:42:02 +0000 (23:42 +0200)]
lib/Function/Parameters.pm

index e84c3de..8af625e 100644 (file)
@@ -91,7 +91,11 @@ sub import {
                $clean{attrs} = delete $type{attrs} || '';
                _assert_valid_attributes $clean{attrs} if $clean{attrs};
                
-               $clean{default_arguments} = !!delete $type{default_arguments};
+               $clean{default_arguments} =
+                       exists $type{default_arguments}
+                       ? !!delete $type{default_arguments}
+                       : 1
+               ;
                $clean{check_argument_count} = !!delete $type{check_argument_count};
 
                %type and confess "Invalid keyword property: @{[keys %type]}";