| 1 | package Articulate::Routes::TransparentPreviews; | ||||||||||||||||||||||||||||
| 2 | 6 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 6 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 6 | ▶ | use Moo; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 6 | with 'Articulate::Role::Routes'; | |||||||||||||||||||||||||||
| 7 | 6 | ▶ | use Articulate::Syntax::Routes; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 6 | ▶ | use Articulate::Service; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 0 | ▶ | post '/zone/:zone_id/preview' => sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||||||||||||||||||||
| 11 | 0 | my ( $self, $request ) = @_; | |||||||||||||||||||||||||||
| 12 | 0 | my $zone_id = $request->params->{'zone_id'}; | |||||||||||||||||||||||||||
| 13 | 0 | my $article_id = $request->params->{'article_id'}; | |||||||||||||||||||||||||||
| 14 | 0 | ▶ | return $self->process_request( | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $article_id and $article_id ne ""
MC/DC0%0/2
defined $article_id and $article_id ne ""
defined $article_id
$article_id ne ""
Truth table0%0/3
A and B
A= defined $article_idB= $article_id ne ""
| |||||||||||||||||||||||||||||
| 15 | error => { | ||||||||||||||||||||||||||||
| 16 | simple_message => 'Parameter article_id is required' | ||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||
| 18 | ) unless defined $article_id and $article_id ne ''; | ||||||||||||||||||||||||||||
| 19 | 0 | my $content = $request->params->{'content'}; | |||||||||||||||||||||||||||
| 20 | 0 | $self->process_request( | |||||||||||||||||||||||||||
| 21 | preview => { | ||||||||||||||||||||||||||||
| 22 | location => "zone/$zone_id/article/$article_id", | ||||||||||||||||||||||||||||
| 23 | content => $content, | ||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||
| 25 | ); | ||||||||||||||||||||||||||||
| 26 | 6 | }; | |||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 6 | 1; | |||||||||||||||||||||||||||