The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PPI::Transform::PackageName - Subclass of PPI::Transform specific for modifying package names

VERSION

version v0.0.7

SYNOPSIS

  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');

DESCRIPTION

This module is a subclass of PPI::Transform specific for modifying package name.

OPTIONS

-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.

-word

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.

-quote

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.

-all

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.

AUTHOR

Yasutaka ATARASHI <yakex@cpan.org>

COPYRIGHT AND LICENSE

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.