use Modern::Perl;
This enables the strict and warnings pragmas, as well as all of the features available in Perl 5.10. It also enables C3 method resolution order as documented in "perldoc mro" and loads IO::File and IO::Handle so that you may call methods on filehandles. In the future, it may include additional core modules and pragmas (but is unlikely to include non-core features).
Because so much of this module's behavior uses lexically scoped pragmas, you may disable these pragmas within an inner scope with:
no Modern::Perl;
See <http://www.modernperlbooks.com/mt/2009/01/toward-a-modernperl.html> for more information, <http://www.modernperlbooks.com/> for further discussion of Modern Perl and its implications, and <http://onyxneon.com/books/modern_perl/index.html> for a freely-downloadable Modern Perl tutorial.
mro::set_mro( scalar caller(), 'c3' );
use Modern::Perl '2009'; use Modern::Perl '2010';
... both enable 5.10 features, while:
use Modern::Perl '2011';
... enables 5.12 features:
use Modern::Perl '2012';
... enables 5.14 features:
use Modern::Perl '2013';
... enables 5.16 features, and:
use Modern::Perl '2014';
... enables 5.18 features, and:
use Modern::Perl '2015';
... enables 5.20 features, and:
use Modern::Perl '2016';
... enables 5.24 features, and:
use Modern::Perl '2017';
... enables 5.24 features, and:
use Modern::Perl '2018';
... enables 5.26 features.
Obviously you cannot use newer features on earlier versions. Perl will throw the appropriate exception if you try.
Please report any bugs or feature requests to "bug-modern-perl at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Modern-Perl>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
perldoc Modern::Perl
You can also look for information at:
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.