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

NAME

Plerd::Tag

DESCRIPTION

Objects of this class represent a categorization tag in a Plerd blog.

CLASS METHODS

new( \%config )

Object constructor. The single config hashref must include the following keys:

plerd

The parent Plerd object.

name

This tag's name. Just an ordinary text string.

ATTRIBUTES

posts

A list reference of all Plerd::Post objects making use of this tag.

uri

A URI object pointing to this tag's detail page.

OBJECT METHODS

add_post ( $post )

Adds the given Plerd::Post object to this tag's list of posts.

ponder_new_name ( $new_name )

Given $new_name, this tag ponders whether it should replace its own name with it. If it decides that that a replacement is due, it goes ahead and performs the swap.

If the current name has no capital letters, and the new name does, then the new name will indeed replace it.

For example, if a tag is named "foo", and we call this method with "Foo", then this tag will rename itself to "Foo". If we call it again with "foo", the tag will remain "Foo".

SEE ALSO

Plerd

AUTHOR

Jason McIntosh <jmac@jmac.org>