File Coverage

blib/lib/TestML.pm
Criterion Covered Total %
statement 20 20 100.0
branch 6 8 75.0
condition n/a
subroutine 3 3 100.0
pod 0 2 0.0
total 29 33 87.8


line stmt bran cond sub pod time code
1             package TestML;
2              
3 25     25   48589 use TestML::Base;
  25         37  
  25         67  
4             our $VERSION = '0.54';
5              
6             has runtime => ();
7             has compiler => ();
8             has bridge => ();
9             has library => ();
10             has testml => ();
11              
12             sub run {
13 23     23 0 43 my ($self) = @_;
14 23         74 $self->set_default_classes;
15 23         89 $self->runtime->new(
16             compiler => $self->compiler,
17             bridge => $self->bridge,
18             library => $self->library,
19             testml => $self->testml,
20             )->run;
21             }
22              
23             sub set_default_classes {
24 23     23 0 39 my ($self) = @_;
25 23 50       70 if (not $self->runtime) {
26 23         8465 require TestML::Runtime::TAP;
27 23         154 $self->{runtime} = 'TestML::Runtime::TAP';
28             }
29 23 100       90 if (not $self->compiler) {
30 19         6260 require TestML::Compiler::Pegex;
31 19         91 $self->{compiler} = 'TestML::Compiler::Pegex';
32             }
33 23 100       100 if (not $self->bridge) {
34 2         572 require TestML::Bridge;
35 2         6 $self->{bridge} = 'TestML::Bridge';
36             }
37 23 50       89 if (not $self->library) {
38 23         7378 require TestML::Library::Standard;
39 23         6917 require TestML::Library::Debug;
40             $self->{library} = [
41 23         102 'TestML::Library::Standard',
42             'TestML::Library::Debug',
43             ];
44             }
45             }
46              
47             1;