File::Path::Localize - locale and path aware file name resolution


File-Path-Localize documentation  | view source Contained in the File-Path-Localize distribution.

Index


NAME

Top

    File::Path::Localize - locale and path aware file name resolution

SYNOPSIS

Top

    use File::Path::Localize;

    my @filenames = File::Path::Localize::expand(filename => $filename,
						 locales => \@locales);

    my $filepath = File::Path::Localize::locate(filename => $filename,
						path => \@path,
						locales => \@locales);

DESCRIPTION

Top

The File::Path::Localize module provides a method to turn a relative filename into an absolute filename using a listed of paths. It can also localize the file path based on a list of locales.

METHODS

Top

my $filename = locate(filename => $filename, locales => \@locales, path => \@path);

Finds the best matching localized file in a set of paths.

my \@filenames = expand(filename => $filename, locales => \@locales)

Expands a filename with a set of locales. For example given a filename foo.txt and an array of locales [ en_GB.UTF-8, en_US, fr_FR] it will return the set [ foo.txt.en_GB.UTF-8, foo.txt.en_GB, foo.txt.en, foo.txt.en_US, foo.txt.en, foo.txt.fr, foo.txt.fr]

AUTHORS

Top

Daniel Berrange <dan@berrange.com>

COPYRIGHT

Top

SEE ALSO

Top

    L<perl(1)> 


File-Path-Localize documentation  | view source Contained in the File-Path-Localize distribution.