On Thu, May 20, 2010 at 12:32, Frank Wiegand <frank.wiegand@gmail.com> wrote: > Am Donnerstag, den 20.05.2010, 12:57 +0100 schrieb Ben Morrow: >> Quoth smueller@cpan.org (Steffen Mueller): >> > FWIW, I think documenting the current equivalent of -E (i.e. -e 'use >> > 5.0XX;') is at best adding noise to the documentation. The perl core may >> > have many problems but certainly, none of those is *lack* of docs. >> >> Is it worth documenting the shorter version of that, that is >> >> perl -M5.10.0 -e'...' > > % perl -E '$notset' > > % perl -e 'use 5.012; $notset' > Global symbol "$notset" requires explicit package name at -e line 1. > Execution of -e aborted due to compilation errors. > > C<use 5.012> enables feature.pm *and* strictures (without loading strict.pm). > > -E (on 5.012) is the same as > > % perl -e 'use feature ":5.12"' > > But how to document this generically? > > % perl -e 'use feature ":$^V"' > Feature bundle "v5.12.1" is not supported by Perl 5.12.1 at -e line 1 > BEGIN failed--compilation aborted at -e line 1. > > % perl -e 'use feature ":$]"' > Feature bundle "5.012001" is not supported by Perl 5.12.1 at -e line 1 > BEGIN failed--compilation aborted at -e line 1. > > > Frank > By saying that we have bundles for major versions starting with 5.10. This also needs to be brought up to date: """ It's possible to load a whole slew of features in one go, using a I<feature bundle>. The name of a feature bundle is prefixed with a colon, to distinguish it from an actual feature. At present, the only feature bundle is C<use feature ":5.10"> which is equivalent to C<use feature qw(switch say state)>. """Thread Previous | Thread Next