File Coverage

blib/lib/Path/Router/Route/Match.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Path::Router::Route::Match;
2             our $AUTHORITY = 'cpan:STEVAN';
3             $Path::Router::Route::Match::VERSION = '0.15';
4 15     15   56 use Types::Standard 1.000005 qw(Str HashRef InstanceOf);
  15         230  
  15         87  
5              
6 15     15   7325 use Moo 2.000001;
  15         232  
  15         68  
7 15     15   3062 use namespace::clean 0.23;
  15         281  
  15         79  
8             # ABSTRACT: The result of a Path::Router match
9              
10              
11             has 'path' => (is => 'ro', isa => Str, required => 1);
12             has 'mapping' => (is => 'ro', isa => HashRef, required => 1);
13              
14             has 'route' => (
15             is => 'ro',
16             isa => InstanceOf['Path::Router::Route'],
17             required => 1,
18             handles => [qw[target]]
19             );
20              
21             1;
22              
23             __END__
24              
25             =pod
26              
27             =encoding UTF-8
28              
29             =head1 NAME
30              
31             Path::Router::Route::Match - The result of a Path::Router match
32              
33             =head1 VERSION
34              
35             version 0.15
36              
37             =head1 DESCRIPTION
38              
39             This is the object returned from calling C<match> on a L<Path::Router>
40             instance. It contains all the information you would need to do any
41             dispatching nessecary.
42              
43             =head1 METHODS
44              
45             =over 4
46              
47             =item B<new>
48              
49             =item B<path>
50              
51             This is the path that was matched.
52              
53             =item B<mapping>
54              
55             This is the mapping of your router part names to the actual parts of
56             the path. If your route had no "variables", then this will be an empty
57             HASH ref.
58              
59             =item B<route>
60              
61             This is the L<Path::Router::Route> instance that was matched.
62              
63             =item B<target>
64              
65             This method simply delegates to the C<target> method of the C<route>
66             that was matched.
67              
68             =item B<meta>
69              
70             =back
71              
72             =head1 BUGS
73              
74             All complex software has bugs lurking in it, and this module is no
75             exception. If you find a bug please either email me, or add the bug
76             to cpan-RT.
77              
78             =head1 AUTHOR
79              
80             Stevan Little E<lt>stevan@cpan.orgE<gt>
81              
82             =head1 COPYRIGHT AND LICENSE
83              
84             Copyright 2008-2011 Infinity Interactive, Inc.
85              
86             L<http://www.iinteractive.com>
87              
88             This library is free software; you can redistribute it and/or modify
89             it under the same terms as Perl itself.
90              
91             =head1 AUTHOR
92              
93             Stevan Little <stevan@cpan.org>
94              
95             =head1 COPYRIGHT AND LICENSE
96              
97             This software is copyright (c) 2016 by Infinity Interactive.
98              
99             This is free software; you can redistribute it and/or modify it under
100             the same terms as the Perl 5 programming language system itself.
101              
102             =cut