File Coverage

blib/lib/Path/IsDev/Role/Heuristic.pm
Criterion Covered Total %
statement 21 21 100.0
branch 1 2 50.0
condition n/a
subroutine 8 8 100.0
pod 2 2 100.0
total 32 33 96.9


line stmt bran cond sub pod time code
1 22     22   8433 use 5.008; # utf8
  22         51  
2 22     22   82 use strict;
  22         22  
  22         383  
3 22     22   67 use warnings;
  22         22  
  22         455  
4 22     22   558 use utf8;
  22         36  
  22         86  
5              
6             package Path::IsDev::Role::Heuristic;
7              
8             our $VERSION = '1.001003';
9              
10             # ABSTRACT: Base role for Heuristic things.
11              
12             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
13              
14 149     149   477 sub _blessed { require Scalar::Util; goto &Scalar::Util::blessed }
  149         464  
15              
16 22     22   2141 use Role::Tiny qw( requires );
  22         3258  
  22         107  
17              
18              
19              
20              
21              
22              
23              
24              
25              
26              
27              
28              
29              
30              
31              
32              
33              
34              
35              
36              
37              
38              
39              
40              
41             sub name {
42 149     149 1 133 my $name = shift;
43 149 50       215 $name = _blessed($name) if _blessed($name);
44 149         468 $name =~ s/\APath::IsDev::Heuristic:/+ :/msx;
45 149         285 return $name;
46             }
47              
48              
49              
50              
51              
52              
53              
54              
55              
56             sub heuristic_type {
57 136     136 1 186 return 'positive heuristic';
58             }
59              
60              
61              
62              
63              
64              
65              
66              
67              
68              
69              
70              
71              
72              
73              
74              
75              
76              
77              
78              
79              
80              
81             requires 'matches';
82              
83             1;
84              
85             __END__