PPI::Transform::PackageName - Subclass of PPI::Transform specific for modifying package names
version v0.0.7
use PPI::Transform::PackageName; my $trans = PPI::Transform::PackageName->new(-package_name => sub { s/Test//g }, -word => sub { s/Test//g }); $trans->file('Input.pm' => 'Output.pm');
This module is a subclass of PPI::Transform specific for modifying package name.
Specify code reference called for modifying arguments of package statements. The code reference is called for each argument. Original is passed as $_ and it is expected that $_ is modified.
package
Specify code reference called for modifying bare words other than arguments of package statement. The code reference is called for each bare word. Original is passed as $_ and it is expected that $_ is modified.
Specify code reference called for modifying quotes. The code reference is called for each quote. Original is passed as $_ and it is expected that $_ is modified. Please NOTE that you SHOULD be careful to handle them because all quotes are considered.
Specify code reference called for all the above options. Original is passed as $_ and it is expected that $_ is modified. This option and others are contradictory.
Yasutaka ATARASHI <yakex@cpan.org>
This software is copyright (c) 2012 by Yasutaka ATARASHI.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install filtered, copy and paste the appropriate command in to your terminal.
cpanm
cpanm filtered
CPAN shell
perl -MCPAN -e shell install filtered
For more information on module installation, please visit the detailed CPAN module installation guide.