Daniel P. Berrangé > File-Path-Localize > File::Path::Localize

Download:
File-Path-Localize-1.0.1.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.0.1   Source  

NAME ^

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

SYNOPSIS ^

    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 ^

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 ^

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 ^

Daniel Berrange <dan@berrange.com>

COPYRIGHT ^

    Copyright (C) 2004 Daniel P. Berrange <dan@berrange.com>

SEE ALSO ^

    L<perl(1)> 
syntax highlighting: