explain no warnings closure
Matt S Trout [Sun, 7 Nov 2010 01:08:54 +0000 (01:08 +0000)]
lib/Sub/Quote.pm

index 7015651..17e1215 100644 (file)
@@ -40,6 +40,9 @@ sub _unquote_all_outstanding {
     my $o_quoted = perlstring $outstanding;
     $make_sub .= (
       $name
+         # disable the 'variable $x will not stay shared' warning since
+         # we're not letting it escape from this scope anyway so there's
+         # nothing trying to share it
         ? "  no warnings 'closure';\n  sub ${name} {\n"
        : "  \$Sub::Quote::QUOTED{${o_quoted}}[3] = sub {\n"
     );