Toader::Page - This provides methods for a named page.
Version 0.0.2
For information on the storage and rendering of entries, please see 'Documentation/Page.pod'.
If any of the new methods error, the error is permanent.
This creates the a object that represents a page.
This is the rendering engine the body should use.
If not defined, html will be used.
This is the body.
This is the short name of the page.
This is the from address to use.
This is a list of files that will be made available with this page.
Wether or not to publish it or not. This is a boolean value and uses "0" and "1".
If not specified, it uses "1".
my $foo = Toader::isaToaderDir->new(\%args); if ($foo->error){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This creates a new page from a string.
One argument is accepted and it is the name string to use.
my $foo=Toader::Page->newFromString($pageString); if($foo->error){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This returns the page as a string.
my $mimeString=$foo->as_string; if($foo->error) warn('Error:'.$foo->error.': '.$foo->errorString); }
This gets body.
my $body=$foo->bodyGet; if($foo->error){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This sets the body.
One argument is required and it is the body.
$foo->bodySet($body); if($foo->error){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This gets Toader directory this entry is associated with.
This will only error if a permanent error is set.
my $dir=$foo->dirGet; if($foo->error){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This sets Toader directory this entry is associated with.
One argument is taken and it is the Toader directory to set it to.
$foo->dirSet($toaderDirectory); if($foo->error){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This returns the from.
my $from=$foo->fromGet; if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This sets the from.
One argument is taken and it is the name.
$foo->fromSet($name); if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This returns the name.
my $name=$foo->nameGet; if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This sets the short name.
$foo->nameSet($name); if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This returns the publish value.
my $publish=$foo->publishGet; if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This sets the publish value.
One argument is taken and it is the publish value.
If no value is set, it uses the default, "1".
It must be a recognized boolean value, either "0" or "1".
$foo->publishSet($publish); if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This returns the renderer type.
my $renderer=$foo->rendererGet; if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This sets the renderer type.
One argument is taken and it is the render type.
A value of undef sets it to the default, 'html'.
This adds a new file as a subpart.
One argument is required and it is the path to the file.
$foo->subpartsAdd( $file ); if ( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This extracts the subparts of a entry.
One argument is extracted, it is the directory to extract the files to.
$foo->subpartsExtract( $dir ); if ( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This returns the results from the subparts methods from the internal Email::MIME object.
my @parts=$foo->subpartsGet; if ( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This returns a list filenames for the subparts.
my @files=$foo->subpartsList; if ( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This removes the specified subpart.
One argument is required and it is the name of the file to remove.
$foo->subpartsRemove( $filename ); if ( $foo->error ){ warn('Error:'.$foo->error.': '.$foo->errorString); }
This returns the summary.
my $summary=$foo->summaryGet; if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This sets the summary.
One argument is taken and it is the summary.
$foo->summarySet($summary); if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This saves the page file. It requires dirSet to have been called previously.
$foo->write; if($foo->error){ warn('error: '.$foo->error.":".$foo->errorString); }
This returns the file directory for the object.
This is not a full path, but a partial path that should be appended the directory current directory being outputted to.
This returns the location ID.
This one requires the object to be initialized.
This is the directory that it will be rendered to.
The base directory that will be used for rendering.
This returns the module to use for rendering.
my $module=$foo->renderUsing;
This method returns true and marks it as being Toader renderable.
This returns the relative path to the object.
No name specified.
Unable to create Email::MIME object.
Has files specified, but the passed object is not a array.
The file does not exist or is not a file.
File::MimeInfo->mimetype returned undef, meaning the file does not exist or is not readable.
Unable to open the file.
Unable to create a Email::MIME object for one of the parts/files.
No body defined.
Not a Toader directory.
No longer appears to be a Toader directory.
No directory has been specified.
The pages directory could not be created.
The publish value is not a recognized boolean value.
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
<vvelox at vvelox.net>
Please report any bugs or feature requests to bug-toader at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Toader. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-toader at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Toader::Page
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Toader
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Toader
CPAN Ratings
http://cpanratings.perl.org/d/Toader
Search CPAN
http://search.cpan.org/dist/Toader/
Copyright 2011 Zane C. Bowers-Hadley.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Toader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Toader
CPAN shell
perl -MCPAN -e shell install Toader
For more information on module installation, please visit the detailed CPAN module installation guide.