examples/global-destruction.plx

filter: Statementstmt 100% 19 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« examples/destroyed.plx ↑ Summary examples/refs.plx »
1 #!/usr/bin/env perl
2 1 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Devel::WatchVars;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶sub twice { return 2 * shift }
Subroutine twice: called CC=1 SCAR=0.0
8  
9 1 our $x = 1;
10  
11 1 watch($x, '$x');
12  
13 1 say "starting watched value is $x";
14  
15 1 $x = 5 + twice(++$x);
16  
17 1 say "ending watched value is $x";
18 1 say "program is done";
19  
20 1 exit;
21  
22 __END__
« examples/destroyed.plx ↑ Summary examples/refs.plx »