« blib/lib/Tapper/Reports/Web/Controller/Tapper/Preconditions/Id.pm
↑ Summary
blib/script/tapper_reports_web_cgi.pl »
| 1 | package Tapper::Reports::Web::Role::BehaviourModifications::Path; | ||||||||||
| 2 | 13 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||
| 3 | 13 | $Tapper::Reports::Web::Role::BehaviourModifications::Path::VERSION = '5.0.17'; | |||||||||
| 4 | 13 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # I am sick of getting relocated/rebase on our local path! | ||||||||||
| 7 | # Cut away a trailing 'tapper/' from base and prepend it to path. | ||||||||||
| 8 | # All conditionally only when this annoying environment is there. | ||||||||||
| 9 | 21 | ▶ | after 'prepare_path' => sub { | ||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||
| 10 | 21 | my ($c) = @_; | |||||||||
| 11 | |||||||||||
| 12 | 21 | my $base = $c->req->{base}.""; | |||||||||
| 13 | 21 | ▶ | $base =~ s,tapper/$,, if $base; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 21 | $c->req->{base} = bless( do{\(my $o = $base)}, 'URI::http' ); | |||||||||
| 15 | 21 | ▶ | $c->req->path('tapper/'.$c->req->path) unless ( $c->req->path =~ m,^tapper/?,); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 13 | }; | |||||||||
| 17 | |||||||||||
| 18 | 13 | 1; | |||||||||
| 19 | |||||||||||
| 20 | __END__ | ||||||||||