blib/lib/Acme/Godot.pm

filter: Statementstmt 73.3% 11 / 15 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 70.8% 17 / 24 SCAR 12.4
CC
3
Cov
63%
BEGIN
4.5
_waiting_for_godot
1.3
BEGIN
1.0
CRAP 3.5
« Build ↑ Summary
1 #This is a -*- perl -*- module file
2 #
3 # Copyright (c) 2007 Salve J. Nilsen
4 #
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 package Acme::Godot;
8  
9 1 ▶use version; our $VERSION = qv(0.1.1)->numify;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # Module implementation here
12  
13 BEGIN {
14 eval {
15 sub _waiting_for_godot {
16 1 ▶ sleep 60 * 60 * 24; # Act 1 - the first day
Subroutine _waiting_for_godot: called CC=1 SCAR=2.6
17 0 sleep 60 * 60 * 24 * 365; # Intermission. Get your snacks!
18 0 sleep 60 * 60 * 24; # Act 2 - the second day
19 }
20  
21 sub _godot_has_arrived {
22 1 ▶ 0; # Nowhere to be seen.
Subroutine _godot_has_arrived: called CC=1 SCAR=0.0
23 }
24 1 ▶ };
Subroutine BEGIN: called CC=3 SCAR=15.1
25  
26 1 ▶ PLAY: while (! _godot_has_arrived() ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not _godot_has_arrived()) 1 0 1
27 1 _waiting_for_godot();
28 0 ▶ redo PLAY unless _godot_has_arrived();
Branch: 1 branch
BranchTrueFalseTotal
unless _godot_has_arrived() 0 0 0
29 }
30 continue {
31 0 exit; # The play is over! Godot is here!
32 }
33 }
34  
35  
36 1; # End of Acme::Godot
37 __END__
« Build ↑ Summary