GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Toader::Templates(3) User Contributed Perl Documentation Toader::Templates(3)

Toader::Templates - This handles fetching Toader templates.

Version 1.0.0

For information on the storage and rendering of entries, please see 'Documentation/Templates.pod'.

args hash ref

dir

This is the directory to intiate in.

toader

This is a Toader object.

    my $foo = Toader::Templates->new( \%args );
    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 fills in a template that has been passed to it.

Two arguments are taken. The first is the template name. The second is a hash reference.

The returned string is the filled out template.

    my $rendered=$foo->fill_in( $templateName, \%hash );
    if ( $foo->error ){
        warn( 'Error:'.$foo->error.': '.$foo->errorString );
    }

This fills in a template that has been passed to it.

Two arguments are required and the first is the template string to use and second it is the hash to pass to it.

The returned string is the filled out template.

    my $rendered=$foo->fill_in_string( $templateString, \%hash );
    if ( $foo->error ){
        warn( 'Error:'.$foo->error.': '.$foo->errorString );
    }

This finds a specified template.

One arguement is taken and it is the name of the template.

A return of undef can mean either a error or it was not found. If there was an error, the method error will return true.

    my $templateFile=$foo->findTemplate($templateName);
    if( !defined( $templateFile ) ){
        if($foo->error){
            warn('Error:'.$foo->error.': '.$foo->errorString);
        }else{
            print("Not found\n");
        }
    }else{
        print $templateFile."\n";
    }

This finds a template and then returns it.

The method findTemplate will be used and if that fails the default template will be returned.

One arguement is required and it is the template name.

    my $template=$foo->getTemplate($templateName);
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This finds a default template and then returns it.

One arguement is required and it is the template name.

    my $template=$foo->getTemplate($templateName);
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This lists the various templates in the directory.

    my @templates=$foo->listTemplates;
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This lists the various templates in the directory.

    my @templates=$foo->listTemplates;
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This removes a template from the current directory.

One argument is required and that is the name of the template.

    $foo->remove( $name );
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This sets a template in the current directory.

Two arguments are required and those in order are the name template and the template.

    $foo->set( $name, $template );
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This checks if the template is in the current directory.

One argument is required and that is the name of the template.

    $foo->templateInDir( $name );
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

This makes sure checks to make sure a template name is valid.

    my $returned=$foo->templateNameCheck($name);
    if ($returned){
        print "Valid\n";
    }

The specified directory is not a Toader directory.

No directory has been specified yet.

The directory in question is no longer a toader directory.

Not a valid template name.

Unable to open the template file.

Unable to fetch the default template. It does not exist.

Errored filling out the template string.

Nothing specified for the template string.

Template name is not defined.

The object in question is not a Toader object.

Toader->getVCS errored.

Toader::VCS->usable errored.

Nothing specified for the data for a template.

Toader::VCS->underVCS errored.

Toader::VCS->add errored.

Toader::VCS->delete errored.

Failed to unlink the template.

The requested template is not in this Toader dir.

No Toader object is given.

Zane C. Bowers-Hadley, "<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.

You can find documentation for this module with the perldoc command.

    perldoc Toader::Templates

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 2013 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.

2013-04-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.