PPI::Tr...opyright(3)

πŸ’– PPI::Transform::UpdateCopyright β€” the vibe

okay bestie, so this is the page for PPI::Transform::UpdateCopyright, straight out of the User Contributed Perl Documentation section of your friendly neighbourhood man pages. buckle up πŸŽ€


✨ NAME ✨

PPI::Transform::UpdateCopyright β€” a Demonstration PPI::Transform class. yes, demo. it's giving "show don't tell" πŸ’…


🌸 SYNOPSIS 🌸

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

$transform->file('Module.pm');

that's literally it. two lines and a dream πŸ¦‹


🧚 DESCRIPTION 🧚

so PPI::Transform::UpdateCopyright is a demonstration of a typical PPI::Transform class. it's the tutorial baddie of the family.

what it actually does: this class implements a document transform that takes the name of an author and updates the copyright statement to refer to the current year, if it doesn't already do so. no cap. it checks first, it doesn't just bulldoze in there πŸ™ˆ


πŸ‘‘ METHODS πŸ‘‘

πŸ’« new

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

the new constructor creates a fresh transform object for one specific author. it takes a single name parameter, and that should be the name (or a longer string, she's flexible ✨) for the author.

specifying the name is required, bestie. why? so you can change a subset of copyright statements β€” the ones that refer to you β€” out of a whole larger set sitting in a file. it's giving "only touch what's mine" 🫢

πŸ’« name

the name accessor returns the author name that the transform will be searching for copyright statements of. that's it, that's the method. simple. iconic. periodt.


πŸ“ TO DO πŸ“

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

(yes that's the actual to-do item, verbatim, i'm not about to paraphrase a to-do list 😭)


🫢 SUPPORT 🫢

See the support section in the main module.


🌟 AUTHOR 🌟

Adam Kennedy <adamk@cpan.org>


Copyright 2009 - 2011 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.


and that's the whole page, bestie πŸ’– this one shipped with perl v5.42.0, dated 2026-01-17, and it ate. no notes. slay 🌈✨

πŸ“¦ where this page comes from