Test_Progs/loop_variable_names

filter: Statementstmt 3.9% 22 / 554 Branchbran 1.6% 6 / 358 Conditioncond 3.7% 3 / 81 MC/DCmcdc 0.0% 0 / 45 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 3.1% 33 / 1040 CC 1 SCAR 0.0
CC
1
Cov
3%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Test_Progs/eslect_fixed ↑ Summary Test_Progs/reply »
1 #! /usr/bin/perl -w
2  
3 1 my $VERSION = 1.02;
4  
5 1 ▶use blib;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # Restrictions on Loop-variable Names
8 #
9 # Due to a bug in most versions of Text::Balanced,
10 # loop-variable names that look like Perl operators,
11 # including $m, $a, $s, $y, $tr, $qq, $qw, $qr, $qx
12 # and possibly others, cause syntax errors.
13  
14 # are these restrictions fixed ?
15  
16 1 ▶use Shell::POSIX::Select ;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 select $m (@ARGV) { print "$m\n"; }
19 select $a (@ARGV) { print "$a\n"; }
20 select $s (@ARGV) { print "$s\n"; }
21 select $y (@ARGV) { print "$y\n"; }
22 1 ▶select $tr (@ARGV) { print "$tr\n"; }
Branch: 1 branch
BranchTrueFalseTotal
and warn "LINE NUMBER FOR START OF USER CODE_BLOCK IS: ", __LINE__, "\n" 0 1 1
Condition50%1/2
$Shell::POSIX::Select::DEBUG > 1 and
!ll
10
MC/DC0%0/1
$Shell::POSIX::Select::DEBUG > 1 and
$Shell::POSIX::Select::DEBUG > 1
Truth table50%1/2
A
A= $Shell::POSIX::Select::DEBUG > 1
Aresult
00
11
23 select $qq (@ARGV) { print "$qq\n"; }
24 select $qw (@ARGV) { print "$qw\n"; }
25 select $qr (@ARGV) { print "$qr\n"; }
26 select $qx (@ARGV) { print "$qx\n"; }
« Test_Progs/eslect_fixed ↑ Summary Test_Progs/reply »