X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fautovivification.git;a=blobdiff_plain;f=lib%2Fautovivification.pm;h=1e4e06b3ad929d86762ea5fb2881f661c27a9a4d;hp=8b70a75ee51dbbc8c71c6879cd826a6efdfcb8de;hb=327febbfd0a930dd0939838d70e93e2dbc8272dc;hpb=9344c8efc2de7769c8c4e7b4af8f7bd5c928f199 diff --git a/lib/autovivification.pm b/lib/autovivification.pm index 8b70a75..1e4e06b 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -57,8 +57,8 @@ BEGIN { no autovivification; # defaults to qw no autovivification qw; - no autovivification 'warn'; - no autovivification 'strict'; + no autovivification warn => @categories; + no autovivification strict => @categories; Magically called when C is encountered. Enables the features given in C<@opts>, which can be : @@ -125,13 +125,19 @@ In the example, this would require C<$arrayref> (resp. C<$hashref>) to already b C<'warn'> -Emits a warning when an autovivification is avoided. +Emits a warning when an autovivification is avoided for the categories specified in C<@opts>. + +Note that C currently does nothing by itself, in particular it does not make the default categories warn. +This behaviour may change in a future version of this pragma. =item * C<'strict'> -Throws an exception when an autovivification is avoided. +Throws an exception when an autovivification is avoided for the categories specified in C<@opts>. + +Note that C currently does nothing by itself, in particular it does not make the default categories die. +This behaviour may change in a future version of this pragma. =back