File Coverage

blib/lib/Gears/Router/Location.pm
Criterion Covered Total %
statement 22 26 84.6
branch n/a
condition n/a
subroutine 6 7 85.7
pod 3 3 100.0
total 31 36 86.1


line stmt bran cond sub pod time code
1             package Gears::Router::Location;
2             $Gears::Router::Location::VERSION = '0.101';
3 3     3   2073 use v5.40;
  3         14  
4 3     3   18 use Mooish::Base -standard;
  3         60  
  3         27  
5              
6 3     3   46110 use Gears::Router::Pattern;
  3         6  
  3         748  
7              
8             has param 'pattern' => (
9             isa => Str,
10             );
11              
12             has field 'pattern_obj' => (
13             isa => InstanceOf ['Gears::Router::Pattern'],
14             lazy => 1,
15             );
16              
17             with qw(
18             Gears::Router::Proto
19             );
20              
21             sub is_bridge ($self)
22 270     270 1 6901 {
  270         350  
  270         352  
23 270         970 return $self->locations->@* > 0;
24             }
25              
26 387         583 sub compare ($self, $path)
27 387     387 1 515 {
  387         602  
  387         492  
28 387         11783 return $self->pattern_obj->compare($path);
29             }
30              
31 13         33 sub build ($self, @more_args)
32 13     13 1 6187 {
  13         26  
  13         23  
33 13         446 return $self->pattern_obj->build(@more_args);
34             }
35              
36             # must be reimplemented
37             sub _build_pattern_obj ($self)
38 0     0     {
  0            
  0            
39 0           ...;
40             }
41              
42             __END__