Why not adopt me?
This distribution is up for adoption!
If you're interested then please contact the PAUSE module admins via
email.
NAME
Path::IsDev::Role::Heuristic::RegexpFile - Positive Heuristic when a path has a child file matching an expression
VERSION
version 0.6.0
SYNOPSIS
package Some::Heuristic;
use Role::Tiny::With;
with 'Path::IsDev::Role::Heuristic::RegexpFile';
# Match if $PATH contains a child like $PATH/.bashrc or $PATH/.bash_profile
sub basename_regexp {
return qr/ \A [.] bash/xism;
}
1;
ROLE REQUIRES
basename_regexp
Consuming classes must provide this method.
returns : a regexp ref that will be matched on all of $PATH->children's $_->basename
METHODS
matches
Implements matches
for Path::IsDev::Role::Heuristic
if ( $class->matches($result_object) ) {
# one of the items in $result_object->path->children matched $class->basename_regexp
# $result_object has been modified to reflect that
# _debug has been done where relevant
}
else {
# no matches
# $result_object has been modified with diagnostic data
# _debug has been done where relevant
}
AUTHOR
Kent Fredric <kentfredric@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.