Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: Exposing minimum required perl version ('use x.y.z') to Perl code during runtime?by tobyink (Canon) |
on Apr 01, 2014 at 12:08 UTC ( [id://1080540]=note: print w/replies, xml ) | Need Help?? |
Perl doesn't keep track of that - it checks the version number supplied against the current version of Perl and dies if the current Perl is too old. If it doesn't die though, it doesn't save the checked version number anywhere. (The file that does this is pp_ctl.c.) A good default value would be 5.8.1.
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|