Perl::ToPerl6::Transformer::Packages::RewriteUsages - Format 'use Foo;' to 'use Foo:from<Perl5>;'
This Transformer is part of the core Perl::ToPerl6 distribution.
Since this tool's main purpose is helping to migrate legacy code, it assumes that you've installed Inline::Perl5 in order to be able to load Perl5 classes.
Perl6 can use Perl5 classes through the use of the :from<Perl5> adverb. Since this tool is meant to port existing Perl5 code, the transformer assumes that all use statements it sees are for legacy code. Future transformers may migrate Test::More code to Perl6 Test modules:
:from<Perl5>
use
use Foo; --> use Foo:from<Perl5>; use Foo qw(a b); --> use Foo:from<Perl5> qw(a b);
Transforms 'use' statements outside of comments, heredocs, strings and POD.
Does not transform qw() statements into their more modern Perl5 <> equivalent, that is left to later transformers.
qw()
<>
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.