| 1 | package App::ZofCMS::Plugin::ConditionalRedirect; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | our $VERSION = '1.001010'; # VERSION | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 0 | ▶ | sub new { bless {}, shift } | ||||||||||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 0 | ▶ | sub process { | ||||||||||||||||||||||||||
|
Subroutine
process: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 11 | 0 | my ( $self, $template, $query, $config ) = @_; | |||||||||||||||||||||||||||
| 12 | return | ||||||||||||||||||||||||||||
| 13 | unless $template->{plug_redirect} | ||||||||||||||||||||||||||||
| 14 | 0 | ▶ | or $config->conf->{plug_redirect}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$template->{"plug_redirect"} or $config->conf->{"plug_redirect"}
MC/DC0%0/2
$template->{"plug_redirect"} or $config->conf->{"plug_redirect"}
$template->{"plug_redirect"}
$config->conf->{"plug_redirect"}
Truth table0%0/3
A or B
A= $template->{"plug_redirect"}B= $config->conf->{"plug_redirect"}
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | my $sub = delete $template->{plug_redirect} || delete $config->conf->{plug_redirect}; | ||||||||||||||||||||||||||
|
Condition0%0/3
delete $template->{'plug_redirect'} || delete $config->conf->{'plug_redirect'}
MC/DC0%0/2
delete $template->{'plug_redirect'} || delete $config->conf->{'plug_redirect'}
delete $template->{'plug_redirect'}
delete $config->conf->{'plug_redirect'}
Truth table0%0/3
A || B
A= delete $template->{'plug_redirect'}B= delete $config->conf->{'plug_redirect'}
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 0 | my $uri = $sub->( $template, $query, $config ); | |||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | ▶ | defined $uri | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 21 | or return; | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 0 | print $config->cgi->redirect($uri); | |||||||||||||||||||||||||||
| 24 | 0 | exit; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 1 | 1; | |||||||||||||||||||||||||||
| 28 | __END__ | ||||||||||||||||||||||||||||