| 1 | # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- | ||||||||||||||
| 2 | # vim: ts=4 sts=4 sw=4: | ||||||||||||||
| 3 | package CPAN::Prompt; | ||||||||||||||
| 4 | 26 | ▶ | use overload '""' => "as_string"; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 26 | ▶ | use vars qw($prompt); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 26 | ▶ | use vars qw( | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | $VERSION | ||||||||||||||
| 8 | 26 | ); | |||||||||||||
| 9 | 26 | $VERSION = "5.5"; | |||||||||||||
| 10 | |||||||||||||||
| 11 | |||||||||||||||
| 12 | 26 | $prompt = "cpan> "; | |||||||||||||
| 13 | 26 | ▶ | $CPAN::CurrentCommandId ||= 0; | ||||||||||||
|
Condition50%1/2
$CPAN::CurrentCommandId ||= 0
MC/DC0%0/1
$CPAN::CurrentCommandId ||= 0
$CPAN::CurrentCommandId
Truth table50%1/2
A
A= $CPAN::CurrentCommandId
| |||||||||||||||
| 14 | 0 | ▶ | sub new { | ||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 15 | 0 | ▶ | bless {}, shift; | ||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||
| 16 | } | ||||||||||||||
| 17 | 0 | ▶ | sub as_string { | ||||||||||||
|
Subroutine
as_string: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 18 | 0 | ▶ | my $word = "cpan"; | ||||||||||||
|
Subroutine
as_string: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||
| 19 | 0 | ▶ | unless ($CPAN::META->{LOCK}) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 20 | 0 | $word = "nolock_cpan"; | |||||||||||||
| 21 | } | ||||||||||||||
| 22 | 0 | ▶ | if ($CPAN::Config->{commandnumber_in_prompt}) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 23 | 0 | sprintf "$word\[%d]> ", $CPAN::CurrentCommandId; | |||||||||||||
| 24 | } else { | ||||||||||||||
| 25 | 0 | "$word> "; | |||||||||||||
| 26 | } | ||||||||||||||
| 27 | } | ||||||||||||||
| 28 | |||||||||||||||
| 29 | 26 | 1; | |||||||||||||