blib/lib/CPAN/Prompt.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 4 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 50.0% 17 / 34 CC 3 SCAR 17.7
CC
3
Cov
54%
as_string
12.0
new
2.0
BEGIN
1.0
CRAP 5.9
« blib/lib/CPAN/Plugin.pm ↑ Summary blib/lib/CPAN/Exception/blocked_urllist.pm »
1 # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*-
2 # vim: ts=4 sts=4 sw=4:
3 package CPAN::Prompt;
4 24 ▶use overload '""' => "as_string";
Subroutine BEGIN: called CC=1 SCAR=0.0
5 24 ▶use vars qw($prompt);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 24 use vars qw(
7 $VERSION
8 24 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 24 $VERSION = "5.5";
10  
11  
12 24 $prompt = "cpan> ";
13 24 ▶$CPAN::CurrentCommandId ||= 0;
Condition50%1/2
$CPAN::CurrentCommandId ||= 0
l!l
024
MC/DC0%0/1
$CPAN::CurrentCommandId ||= 0
$CPAN::CurrentCommandId
Truth table50%1/2
A
A= $CPAN::CurrentCommandId
Aresult
11
00
14 sub new {
15 0 ▶ bless {}, shift;
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
16 }
17 sub as_string {
18 0 ▶ my $word = "cpan";
Subroutine as_string: not called CC=3 SCAR=24.8
Pod undocumented
19 0 ▶ unless ($CPAN::META->{LOCK}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($CPAN::META->{"LOCK"}) 0 0 0
20 0 $word = "nolock_cpan";
21 }
22 0 ▶ if ($CPAN::Config->{commandnumber_in_prompt}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($CPAN::Config->{'commandnumber_in_prompt'}) { } 0 0 0
23 0 sprintf "$word\[%d]> ", $CPAN::CurrentCommandId;
24 } else {
25 0 "$word> ";
26 }
27 }
28  
29 24 1;
« blib/lib/CPAN/Plugin.pm ↑ Summary blib/lib/CPAN/Exception/blocked_urllist.pm »