in reply to Use of "Use 5.XXX" pragma
So you're wondering what use is all about?
http://search.cpan.org/dist/perl-5.10.0/pod/perlfunc.pod#use
http://search.cpan.org/dist/perl-5.12.0/pod/perlfunc.pod#use
http://search.cpan.org/dist/perl-5.14.0/pod/perlfunc.pod#use
http://search.cpan.org/dist/perl-5.16.0/pod/perlfunc.pod#use
As Tutorials: Basic debugging checklist teaches, use B::Deparse to see how perl interprets the code
$ perl -MO=Deparse -le " use 5.010; " BEGIN { $/ = "\n"; $\ = "\n"; } sub BEGIN { require 5.01; } -e syntax OK
Hmm, try again :)
$ perl -MO=Deparse -le " use 5.010; state $fudge; " BEGIN { $/ = "\n"; $\ = "\n"; } sub BEGIN { require 5.01; } no feature; use feature ':5.10'; state $fudge; -e syntax OK
There you have it, state, feature
http://search.cpan.org/dist/perl-5.10.0/lib/feature.pm
http://search.cpan.org/dist/perl-5.12.0/lib/feature.pm
http://search.cpan.org/dist/perl-5.14.0/lib/feature.pm
http://search.cpan.org/dist/perl-5.16.0/lib/feature.pm
|
|---|