Why not adopt me?
NAME
Perl::ToPerl6::Transformer::Pragma::RewritePragmas - Remove unnecessary pragmas
AFFILIATION
This Transformer is part of the core Perl::ToPerl6 distribution.
DESCRIPTION
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:
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.
CONFIGURATION
This Transformer is not configurable except for the standard options.
AUTHOR
Jeffrey Goff <drforr@pobox.com>
COPYRIGHT
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.