From: Toby Inkster Date: Tue, 28 May 2013 07:29:24 +0000 (+0100) Subject: Document Sub::Quote's use of strictures as a caveat X-Git-Tag: v1.003000~67 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da2ddf62d0c19e0f8a92a4317bfc7e45e9c7b861;p=gitmo%2FMoo.git Document Sub::Quote's use of strictures as a caveat --- diff --git a/lib/Sub/Quote.pm b/lib/Sub/Quote.pm index 5e8e457..3fafde6 100644 --- a/lib/Sub/Quote.pm +++ b/lib/Sub/Quote.pm @@ -253,6 +253,20 @@ It might turn up in the intended context as follows: Which will obviously return from foo, when all you meant to do was return from the code context in quote_sub and proceed with running important code b. +=head2 strictures + +Sub::Quote compiles quoted subs in an environment where C<< use strictures >> +is in effect. L enables L and FATAL L. + +The following dies I<< Use of uninitialized value in print... >> + + no warnings; + quote_sub 'Silly::kitty', q{ print undef }; + +If you need to disable parts of strictures, do it within the quoted sub: + + quote_sub 'Silly::kitty', q{ no warnings; print undef }; + =head1 SUPPORT See L for support and contact informations.