File Coverage

blib/lib/Router/Dumb/Match.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Router::Dumb::Match 0.006;
2 1     1   6 use Moose;
  1         3  
  1         4  
3             # ABSTRACT: a dumb match against a dumb route
4              
5 1     1   5560 use namespace::autoclean;
  1         6458  
  1         3  
6              
7             #pod =head1 OVERVIEW
8             #pod
9             #pod Match objects are dead simple. They have a C<target> method that returns the
10             #pod target of the match (from the Route taken), a C<matches> method that returns a
11             #pod list of pairs of the placeholders matched, and a C<route> method that returns
12             #pod the L<route object|Router::Dumb::Route> that led to the match.
13             #pod
14             #pod =cut
15              
16             has route => (
17             is => 'ro',
18             isa => 'Router::Dumb::Route',
19             required => 1,
20             handles => [ qw(target) ],
21             );
22              
23             has matches => (
24             isa => 'HashRef',
25             required => 1,
26             traits => [ 'Hash' ],
27             handles => {
28             matches => 'elements',
29             },
30             );
31              
32             1;
33              
34             __END__
35              
36             =pod
37              
38             =encoding UTF-8
39              
40             =head1 NAME
41              
42             Router::Dumb::Match - a dumb match against a dumb route
43              
44             =head1 VERSION
45              
46             version 0.006
47              
48             =head1 OVERVIEW
49              
50             Match objects are dead simple. They have a C<target> method that returns the
51             target of the match (from the Route taken), a C<matches> method that returns a
52             list of pairs of the placeholders matched, and a C<route> method that returns
53             the L<route object|Router::Dumb::Route> that led to the match.
54              
55             =head1 PERL VERSION
56              
57             This library should run on perls released even a long time ago. It should work
58             on any version of perl released in the last five years.
59              
60             Although it may work on older versions of perl, no guarantee is made that the
61             minimum required version will not be increased. The version may be increased
62             for any reason, and there is no promise that patches will be accepted to lower
63             the minimum required perl.
64              
65             =head1 AUTHOR
66              
67             Ricardo Signes <cpan@semiotic.systems>
68              
69             =head1 COPYRIGHT AND LICENSE
70              
71             This software is copyright (c) 2022 by Ricardo Signes.
72              
73             This is free software; you can redistribute it and/or modify it under
74             the same terms as the Perl 5 programming language system itself.
75              
76             =cut