NAME

File::Find::Match::Util - Some exportable utility functions for writing rulesets.

SYNOPSIS

use File::Find::Match::Util qw( filename );

$pred = filename('foobar.pl');

$pred->('foobar.pl')         == 1;
$pred->('baz/foobar.pl')     == 1;
$pred->('baz/bar/foobar.pl') == 1;
$pred->('bazquux.pl')        == 0;
  

DESCRIPTION

This provides a few handy functions which create predicates for File::Find::Match.

FUNCTIONS

The following functions are available for export.

filename($basename)

This function returns a subroutine reference, which takes one argument $file and returns true if File::Basename::basename($file) eq $basename, false otherwise. See File::Basename for details.

Essentially, filename('foobar') is equivalent to:

sub { File::Basename::basename($_[0]) eq 'foobar' }

EXPORTS

None by default.

"filename($basename)" upon request.

BUGS

None known. Bug reports are welcome.

Please use the CPAN bug ticketing system at http://rt.cpan.org/. You can also mail bugs, fixes and enhancements to <bug-file-find-match at rt.cpan.org>.

CREDITS

Thanks to Andy Wardly for the name, and the Template Toolkit list for inspiration.

AUTHOR

Dylan William Hardison <dhardison@cpan.org>

http://dylan.hardison.net/

SEE ALSO

File::Find::Match, File::Find, perl(1).

COPYRIGHT and LICENSE

Copyright (C) 2004 Dylan William Hardison. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

1;