| 1 | package Test2::Require; | ||||||||||||
| 2 | 17 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 17 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 17 | our $VERSION = '1.302226'; | |||||||||||
| 6 | |||||||||||||
| 7 | 17 | ▶ | use Test2::API qw/context/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 17 | ▶ | use Carp qw/croak/; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | |||||||||||||
| 10 | 1 | ▶ | sub skip { | ||||||||||
|
Subroutine
skip: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 11 | 1 | my $class = shift; | |||||||||||
| 12 | 1 | croak "Class '$class' needs to implement 'skip()'"; | |||||||||||
| 13 | } | ||||||||||||
| 14 | |||||||||||||
| 15 | 8 | ▶ | sub import { | ||||||||||
|
Subroutine
import: called CC=4 SCAR=14.0
| |||||||||||||
| 16 | 8 | my $class = shift; | |||||||||||
| 17 | 8 | ▶ | return if $class eq __PACKAGE__; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 18 | |||||||||||||
| 19 | 7 | my $skip = $class->skip(@_); | |||||||||||
| 20 | 7 | ▶ | return unless defined $skip; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 21 | |||||||||||||
| 22 | 3 | my $ctx = context(); | |||||||||||
| 23 | 3 | ▶ | $ctx->plan(0, SKIP => $skip || "No reason given."); | ||||||||||
|
Condition50%1/2
$skip || 'No reason given.'
MC/DC0%0/1
$skip || 'No reason given.'
$skip
Truth table50%1/2
A
A= $skip
| |||||||||||||
| 24 | 0 | $ctx->release; | |||||||||||
| 25 | } | ||||||||||||
| 26 | |||||||||||||
| 27 | 17 | 1; | |||||||||||
| 28 | |||||||||||||
| 29 | __END__ | ||||||||||||