Zane C. Bowers-Hadley

NAME

Toader::Entry::Cache - Misc helper methods for entries.

VERSION

Version 0.0.0

METHODS

new

This initializes this object.

On argument is required and it is a Toader object.

    my $foo = Toader::Entry::Cache->new( $toader );
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

cachefile

This returns the SQLite file that contains the cache for this directory.

    my $cacheFile=$foo->cachefile;
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

connect

This connect to the SQLite database containing the cache and returns the database handler.

    my $dbh=$foo->connect;
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

deleteEntry

Deletes a specified entry from the cache.

One argument is taken and the is the name of the entry.

        $foo->deleteEntry( $entryName );
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

disconnect

This disconnect from the SQLite database containing the cache and returns the database handler.

    my $dbh=$foo->connect;
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

init

This checks if the cache needs initialized for the directory. If it does need initialized it will do so.

    $foo->init
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

reinit

Re-initializes the SQLite database. This will connect to it, drop the tables, and then recreate the tables.

    $foo->reinit;
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

setDir

This sets the directory to operate on.

One argument is required. It is the directory to use.

    $foo->setDir($directory);
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

updateAll

Updates the cache for all entries in that directory.

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

updateEntry

Updates the cache for the passed entry.

One argument is taken and that is the Toader::Entry object that the cache is being updated for.

        $foo->updateEntry( $entry );
    if($foo->error){
        warn('error: '.$foo->error.":".$foo->errorString);
    }

ERROR CODES/Flags

1, noToaderObj

The object supplied for the Toader object.

2, notAtoaderObj

The supplies object is not a Toader object.

3, manageNewErrored

Toader::Entry::Manage->new errored.

4, getVCSerrored

Failed to get Toader::VCS object.

5, VCSusableErrored

Toader::VCS->usable errored.

6, noDirSpecified

Nothing was passed as a directory.

7, notAtoaderDir

The specified directory is not a Toader directory.

8, noDirSet

No dir has been set yet.

9, noEntrySpecified

No entry was specified to processes. This needs to be a Toader::Entry object.

10, notAtoaderEntryObj

Not a Toader::Entry object.

11, DBIinitErrored

Failed to initialize the SQLite database via DBI->connect.

12, DBIdoErr

Error with DBI->do.

13, manageSetDirErrored

Failed when calling Toader::Entry::Manage->setDir.

14, manageListErrored

Failed when calling Toader::Entry::Manage->list.

15, manageReadErrored

Failed when calling Toader::Entry::Manage->read.

16, noEntryNameSpecified

No entryName was specified to processes. This id different from noEntrySpecified as noEntrySpecified requires a Toader::Entry object and this just requires a entry name.

17, underVCS errored

Toader::VCS->underVCS errored.

18, VCSaddErrored

Toader::VCS->add errored.

AUTHOR

Zane C. Bowers-Hadley, <vvelox at vvelox.net>

BUGS

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.

SUPPORT

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

    perldoc Toader::Entry::Cache

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2014 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.