| 1 | package Gears::Router::Pattern::Match; | ||||||||||
| 2 | 1 | $Gears::Router::Pattern::Match::VERSION = '0.103'; | |||||||||
| 3 | 1 | ▶ | use v5.40; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use Mooish::Base -standard; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | extends 'Gears::Router::Pattern'; | |||||||||
| 7 | |||||||||||
| 8 | sub compare ($self, $request_path) | ||||||||||
| 9 | ▶ | { | |||||||||
|
Subroutine
compare: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||
| 10 | 237 | my $pattern = $self->pattern; | |||||||||
| 11 | |||||||||||
| 12 | 237 | ▶ | if ($self->is_bridge) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | return undef | ||||||||||
| 14 | 206 | ▶ | unless scalar $request_path =~ m/^\Q$pattern\E/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | } | ||||||||||
| 16 | else { | ||||||||||
| 17 | return undef | ||||||||||
| 18 | 31 | ▶ | unless $request_path eq $pattern; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | # this pattern does not really match anything other than the pattern itself | ||||||||||
| 22 | # - return empty (but defined) list of matches | ||||||||||
| 23 | 211 | return []; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | sub build ($self, @more_args) | ||||||||||
| 27 | ▶ | { | |||||||||
|
Subroutine
build: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 28 | 1 | return $self->pattern; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | __END__ | ||||||||||