NAME
Path::Mapper - Map a virtual path to an actual one
VERSION
version 0.012
SYNOPSIS
my $mapper = Path::Mapper->new( base => '../' )
$mapper->map( a/b => /apple )
$mapper->dir( /a/b/xyzzy/ ) # /apple/xyzzy
$mapper->dir( /a/bxyzzy/ ) # ../a/bxyzzy
DESCRIPTION
Path::Mapper will map a virtual path to an actual one, doing a
substitution based on the deepest common directory
Think of it as doing something like symbolic link resolution (though not
exactly)
USAGE
Path::Mapper->new( [ base => ] )
Create a new "Path::Mapper" object using as the 'root' directory
(by default, everything is mapped to be under that directory)
$mapper->base( )
Change the base directory for $mapper to
$mapper->map( => )
Set up a map from and anything under (e.g. /*) to map
to the prefix instead of the usual base
$mapper->map( )
Return a 2-element list containing the actual base for this path and the
path remainder. You probably don't want/need to use this method
$mapper->dir( )
Map the virtual to an actual one and return the result as a
Path::Class::Dir object
$mapper->file( )
Map the virtual to an actual one and return the result as a
Path::Class::File object
$mapper->path( )
Map the virtual to an actual one and return the result as a
Path::Abstract object
AUTHOR
Robert Krimen
COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Robert Krimen.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.