NAME

Path::IsDev::Role::Heuristic::AnyDir - Positive Heuristic if a path contains one of any of a list of directories

VERSION

version 0.6.0

SYNOPSIS

package Some::Heuristic;
use Role::Tiny::With;
with 'Path::IsDev::Role::Heuristic::AnyDir';

# Match if $PATH contains any of the named children as dirs
sub dirs {
    return qw( .git .build )
}

1;

ROLE REQUIRES

dirs

Any consuming classes must implement this method

returns : A list of directory basenames to match

METHODS

matches

Implements matches for Path::IsDev::Role::Heuristic

if ( $class->matches($result_object) ) {
  # one of the items in $class->dirs matched a directory
  # $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.