From: Vincent Pit Date: Sat, 4 Oct 2014 16:37:31 +0000 (+0200) Subject: Warn about the global slowdown X-Git-Tag: v0.13~2 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fautovivification.git;a=commitdiff_plain;h=e94f0772b780bffe53ab63672bc11f9c218cf967;hp=398244e85bffee464a5bf0b54a22229802033bc4 Warn about the global slowdown --- diff --git a/lib/autovivification.pm b/lib/autovivification.pm index 442f701..f7ddbe7 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -200,6 +200,8 @@ This constant will always be true, except on Windows where it is false for perl =head1 CAVEATS +Using this pragma will cause a slight global slowdown of any subsequent compilation phase that happens anywere in your code - even outside of the scope of use of C - which may become noticeable if you rely heavily on numerous calls to C. + The pragma doesn't apply when one dereferences the returned value of an array or hash slice, as in C<< @array[$id]->{member} >> or C<< @hash{$key}->{member} >>. This syntax is valid Perl, yet it is discouraged as the slice is here useless since the dereferencing enforces scalar context. If warnings are turned on, Perl will complain about one-element slices.