examples/copied.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/hash.plx ↑ Summary examples/destroyed.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 my $x = 1;
10 1 watch($x, '$x');
11 1 say "starting watched value is $x";
12 1 my $y = 5 + twice(++$x);
13 1 say "ending watched value is $x";
14 1 say "but y is $y";
15 1 unwatch $x;
16  
17 __END__
« examples/hash.plx ↑ Summary examples/destroyed.plx »