Bug#876738: better 'when' examples

積丹尼 Dan Jacobson jidanni at jidanni.org
Mon Sep 25 11:43:19 UTC 2017


Package: perl-doc
Version: 5.26.0-8
Severity: wishlist
File: /usr/share/man/man1/perlsyn.1.gz

The man page says

       The "when" modifier is an experimental feature that first appeared in
       Perl 5.14.  To use it, you should include a "use v5.14" declaration.

However the man page contradicts itself, instead giving two examples
using v5.10.1, e.g.,

           use v5.10.1;
           for ($var) {
               when (/^abc/) { $abc = 1 }
               when (/^def/) { $def = 1 }
               when (/^xyz/) { $xyz = 1 }
               default       { $nothing = 1 }
           }

Also there is a space missing in "frequentlythe".




More information about the Perl-maintainers mailing list