| 1 | package Test2::Tools::Condition; | ||
| 2 | 2 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 2 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 2 | our $VERSION = "0.03"; | |
| 6 | |||
| 7 | 2 | ▶ | use Carp (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 2 | ▶ | use Test2::Compare::Condition(); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 2 | %Carp::Internal = ( | |
| 12 | %Carp::Internal, | ||
| 13 | 'Test2::Tools::Condition' => 1, | ||
| 14 | 'Test2::Compare::Condition' => 1, | ||
| 15 | ); | ||
| 16 | |||
| 17 | 2 | our @EXPORT = qw/condition/; | |
| 18 | 2 | ▶ | use Exporter 'import'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 11 | ▶ | sub condition (&) { |
|
Subroutine
condition: called CC=1 SCAR=0.0
Pod
documented
| |||
| 21 | 11 | my @caller = caller; | |
| 22 | 11 | return Test2::Compare::Condition->new( | |
| 23 | file => $caller[1], | ||
| 24 | lines => [$caller[2]], | ||
| 25 | code => $_[0], | ||
| 26 | ); | ||
| 27 | } | ||
| 28 | |||
| 29 | 2 | 1; | |
| 30 | __END__ | ||