File Coverage

blib/lib/Path/Dispatcher/Rule/Empty.pm
Criterion Covered Total %
statement 6 10 60.0
branch 0 2 0.0
condition n/a
subroutine 2 3 66.6
pod n/a
total 8 15 53.3


line stmt bran cond sub pod time code
1             package Path::Dispatcher::Rule::Empty;
2             # ABSTRACT: matches only the empty path
3              
4             our $VERSION = '1.08';
5              
6 31     31   224 use Moo;
  31         73  
  31         198  
7             extends 'Path::Dispatcher::Rule';
8              
9             sub _match {
10 0     0     my $self = shift;
11 0           my $path = shift;
12 0 0         return if length $path->path;
13 0           return { leftover => $path->path };
14             }
15              
16             __PACKAGE__->meta->make_immutable;
17 31     31   12927 no Moo;
  31         100  
  31         151  
18              
19             1;
20              
21             __END__
22              
23             =pod
24              
25             =encoding UTF-8
26              
27             =head1 NAME
28              
29             Path::Dispatcher::Rule::Empty - matches only the empty path
30              
31             =head1 VERSION
32              
33             version 1.08
34              
35             =head1 DESCRIPTION
36              
37             Rules of this class match only the empty path.
38              
39             =head1 SUPPORT
40              
41             Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=Path-Dispatcher>
42             (or L<bug-Path-Dispatcher@rt.cpan.org|mailto:bug-Path-Dispatcher@rt.cpan.org>).
43              
44             =head1 AUTHOR
45              
46             Shawn M Moore, C<< <sartak at bestpractical.com> >>
47              
48             =head1 COPYRIGHT AND LICENSE
49              
50             This software is copyright (c) 2020 by Shawn M Moore.
51              
52             This is free software; you can redistribute it and/or modify it under
53             the same terms as the Perl 5 programming language system itself.
54              
55             =cut