Perl::ToPerl6::Transformer::Pragma::RewritePragmas - Remove unnecessary pragmas
This Transformer is part of the core Perl::ToPerl6 distribution.
Removes uneeded Perl5 pragmas. More specifically, it removes all core pragmas except v6, constant, base and parent. The v6 pragma remains untouched, constant will be transformed later into <constant FOO = 1>, base and parent are added to the class declaration:
v6
constant
base
parent
use strict; --> '' no strict 'refs'; --> '' use warnings; --> '' use constant FOO => 1; --> use constant FOO => 1; use base qw(Foo); --> use base qw(Foo);
Transforms pragmas outside of comments, heredocs, strings and POD.
The 'constant', 'base' and 'parent' pragmas are left untouched for later transformers, so that they can do their Perl6 things.
This Transformer is not configurable except for the standard options.
Jeffrey Goff <drforr@pobox.com>
Copyright (c) 2015 Jeffrey Goff
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Perl::ToPerl6, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Perl::ToPerl6
CPAN shell
perl -MCPAN -e shell install Perl::ToPerl6
For more information on module installation, please visit the detailed CPAN module installation guide.