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

NAME

Toader::pathHelper - Various path related helpers.

VERSION

Version 0.1.0

SYNOPSIS

    use Toader::pathHelper;

    my $foo = Toader::pathHelper->new;

METHODS

new

This initiates the object.

One argument is taken. That is the a Toader directory.

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

atRoot

This checks if a directory is the root or not.

back2root

This returns relative path from specified directory, back to the Toader root directory.

One argument is taken and that is the Toader directory under the root Toader directory.

cleanup

This cleans up the path for a Toader directory.

    my $cleandir=$foo->cleanup($dir);
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

relative

This finds the relative path between two toader directories.

Two arguments are accepted. Both are Toader directories. The first one is the directory to start in and the second is the directory to end in.

    my $relativePath=$foo->relative($fromDir, $toDir);
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

relative2root

This returns relative path from the root Toader directory.

One argument is taken and that is the Toader directory under the root Toader directory.

underRoot

This checks if a specified Toader directory is under the Toader root directory.

One argument is taken and that is a directory. This directory must be a Toader directory.

The returned value is a boolean value.

    my $return=$self->underRoot($dir);
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

underRootNT

This checks if a specified directory is under the Toader root directory. Unlike underRoot, no check is done on if it is a Toader directory or not.

One argument is taken and that is a directory.

The returned value is a boolean value.

This does not check if it exists or not.

    my $return=$self->underRootNT($dir);
    if($foo->error){
        warn('Error:'.$foo->error.': '.$foo->errorString);
    }

ERROR CODES

1, noDirSpecified

No directory specified.

2, notAtoaderDir

The directory is not a Toader directory.

3, otherToaderDir

The Toader directory in question is not under the Toader directory root it was initialized with.

4, notAbleToFindRoot

Unable to find the root Toader directory.

5, notUnderToaderRoot

The directory is not under the root Toader directory.

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::Render

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.