Removing Boilerplate with Import::Into
I recently started a new project and wanted to take advantage of some cool new Perl 5.20 features. In particular, I wanted to use the experimental subroutine signatures feature and postfix dereferencing. That requires the following incantation:
use feature 'signatures'; use feature 'postderef'; no warnings 'experimental::signatures'; no warnings 'experimental::postderef';
That can be abbreviated a bit by passing a list to feature and just turning off the entire experimental class of warnings:
use feature 'signatures', 'postderef'; no warnings 'experimental';
But it's still a couple lines of boilerplate that need to be pasted atop every file in my project. I hate pasting things.
Read more on my blog: Removing Boilerplate with Import::Into