Tassilo von Parseval > File-Locate-0.62 > File::Locate

Download:
File-Locate-0.62.tar.gz

Dependencies

Annotate this POD

Related Modules

File::Find::Rule
File::Find
more...
By perlmonks.org

CPAN RT

New  1
Open  2
View/Report Bugs
Module Version: 0.62   Source  

NAME ^

File::Locate - Search the (s)locate-database from Perl

SYNOPSIS ^

    use File::Locate;

    print join "\n", locate "mp3", "/usr/var/locatedb";

    # or only test of something is in the database

    if (locate("mp3", "/usr/var/locatedb")) {
        print "yep...sort of mp3 there";
    }

    # do regex search
    print join "\n", locate "^/usr", -rex => 1, "/usr/var/locatedb";

ABSTRACT ^

    Search the (s)locate-database from Perl

DESCRIPTION ^

File::Locate provides the locate() function that scans the locate database for a given substring or POSIX regular expression. The module can handle both plain old locate databases as well as the more hip slocate format.

FUNCTIONS ^

The module exports exactly one function.

EXPORT

locate() is exported by default. If you don't want that, then pull in the module like that:

    use File::Locate ();

You have to call the function fully qualified in this case: File::Locate::locate().

SEE ALSO ^

The manpages of your locate(1L)/slocate(1L) program if available.

AUTHOR ^

Tassilo von Parseval <tassilo.von.parseval@rwth-aachen.de>

COPYRIGHT AND LICENSE ^

Copyright 2003-2007 by Tassilo von Parseval

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

syntax highlighting: