diff options
-rw-r--r-- | pod/perlsub.pod | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pod/perlsub.pod b/pod/perlsub.pod index daa25bc042..aeced63527 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -1697,18 +1697,18 @@ L<B::Deparse>, consider this example of two subroutines returning C<1>, one with a C<()> prototype causing it to be inlined, and one without (with deparse output truncated for clarity): - $ perl -MO=Deparse -le 'sub ONE { 1 } if (ONE) { print ONE if ONE }' - sub ONE { - 1; - } - if (ONE ) { - print ONE() if ONE ; - } - $ perl -MO=Deparse -le 'sub ONE () { 1 } if (ONE) { print ONE if ONE }' - sub ONE () { 1 } - do { - print 1 - }; + $ perl -MO=Deparse -le 'sub ONE { 1 } if (ONE) { print ONE if ONE }' + sub ONE { + 1; + } + if (ONE ) { + print ONE() if ONE ; + } + $ perl -MO=Deparse -le 'sub ONE () { 1 } if (ONE) { print ONE if ONE }' + sub ONE () { 1 } + do { + print 1 + }; If you redefine a subroutine that was eligible for inlining, you'll get a warning by default. You can use this warning to tell whether or |