Rudesind::Captioned - A role for things with captions
use Class::Roles does => 'Rudesind::Captioned'; $self->caption
This module provides a role for objects which are captioned, galleries and images. Any class that uses it must provide a _caption_file() method.
_caption_file()
It provides the following methods:
has_caption
Returns a boolean indicating whether or not the object has an existing caption.
caption
Returns the object's caption. Returns a false value if no caption exists.
save_caption ($caption)
Given a string, this method saves the caption. If the argument given is undefined or the empty string, it deletes the object's caption file entirely.
caption_as_html
Calls Rudesind::UI::text_to_html() to turn the object's caption into HTML.
Rudesind::UI::text_to_html()
To install Rudesind, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rudesind
CPAN shell
perl -MCPAN -e shell install Rudesind
For more information on module installation, please visit the detailed CPAN module installation guide.