/tmp/E_NoEUm9QJ.pl

filter: Statementstmt 93.7% 15 / 16 Branchbran 50.0% 1 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 20 / 24 SCAR 0.0
CC
1
Cov
85%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« lib/Command/Interactive/Interaction.pm ↑ Summary
1  
2 #!/usr/bin/perl
3  
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Term::ReadLine;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 my $term = Term::ReadLine->new('Simple password checker');
9 1 my $prompt = 'Please enter your password:';
10 1 ▶my $OUT = $term->OUT || \*STDOUT;
Condition50%1/2
$term->OUT || \*STDOUT
l!l
10
MC/DC0%0/1
$term->OUT || \*STDOUT
$term->OUT
Truth table50%1/2
A
A= $term->OUT
Aresult
11
00
11 1 my $result = $term->readline($prompt);
12 1 ▶if($result eq 'secret')
Branch: 1 branch
BranchTrueFalseTotal
if ($result eq 'secret') { } 1 0 1
13 {
14 1 print "Password accepted.\n";
15 }
16 else
17 {
18 0 print "Password not accepted.\n";
19 }
« lib/Command/Interactive/Interaction.pm ↑ Summary