blib/lib/TestML/Script.pm

filter: Statementstmt 60.0% 3 / 5 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 71.4% 5 / 7 CC 1 SCAR 1.4
CC
1
Cov
60%
BEGIN
1.3
BEGIN
1.0
CRAP 1.1
↑ Summary
1 ##
2 # name: TestML::Script
3 # abstract: Support for running TestML as a script
4 # author: Ingy döt Net <ingy@cpan.org>
5 # license: perl
6 # copyright: 2011
7  
8 1 ▶use 5.008003;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 0 ▶use TestML 0.22 ();
Subroutine BEGIN: called CC=1 SCAR=2.6
10  
11 package TestML::Script;
12  
13 our $VERSION = '0.01';
14  
15 use TestML::Runtime;
16  
17 use XXX;
18  
19 sub run {
20 my $class = shift;
21 my $script = shift;
22  
23 local @ARGV = @_;
24 my $runtime = TestML::Runtime->new(
25 base => '',
26 testml => $script,
27 );
28 $runtime->run();
29 exit 0;
30 }
31  
32 1;
33  
34 =head1 SYNOPSIS
35  
36 #!/usr/bin/env testml
37  
38 %TestML 1.0
39  
40 Print("Hello, world");
41  
42 =head1 DESCRIPTION
43  
44 TestML is a computer programming language for writing Acmeist unit tests (unit
45 tests that run under any programming language and any test framework).
46  
47 This module will let you run TestML as a standalone script.
↑ Summary