Padre::Transform::Perl::UpdateCopyright(3pm)

Padre::Transform::Perl::UpdateCopyright3pm

Demonstration padre::transform class

Usage

  my $transform = Padre::Transform::Perl::UpdateCopyright->new(
      name => 'Adam Kennedy'
  );
  $transform->apply( Padre::Current->document );

Overview

"Padre::Transform::Perl::UpdateCopyright" provides a demonstration of a typical Padre::Transform class.

This class implements a document transform that will take the name of an author and update the copyright statement to refer to the current year, if it does not already do so.

Methods

new

  my $transform = PPI::Transform::UpdateCopyright->new(
      name => 'Adam Kennedy'
  );

The "new" constructor creates a new transform object for a specific author. It takes a single "name" parameter that should be the name (or longer string) for the author.

Specifying the name is required to allow the changing of a subset of copyright statements that refer to you from a larger set in a file.

name

The "name" accessor returns the author name that the transform will be searching for copyright statements of.

To do

- May need to overload some methods to forcefully prevent Document objects becoming children of another Node.

Support

See the support section in the main module.

Author

Adam Kennedy <[email protected]>

From padre 0.63.ds1-1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.