| 1 | package Test2::Require::EnvVar; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use Carp qw/confess/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use base 'Test2::Require'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | our $VERSION = '1.302226'; | |||||||||
| 9 | |||||||||||
| 10 | 3 | ▶ | sub skip { | ||||||||
|
Subroutine
skip: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 11 | 3 | my $class = shift; | |||||||||
| 12 | 3 | my ($var) = @_; | |||||||||
| 13 | 3 | ▶ | confess "no environment variable specified" unless $var; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 2 | ▶ | return undef if $ENV{$var}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 1 | return "This test only runs if the \$$var environment variable is set"; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 1 | 1; | |||||||||
| 19 | |||||||||||
| 20 | __END__ | ||||||||||