Filename | /usr/local/perls/perl-5.26.1/lib/5.26.1/CPAN/Prompt.pm |
Statements | Executed 17 statements in 78µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
4 | 1 | 1 | 64µs | 64µs | as_string | CPAN::Prompt::
1 | 1 | 1 | 10µs | 10µs | new | CPAN::Prompt::
0 | 0 | 0 | 0s | 0s | BEGIN | CPAN::Prompt::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # -*- Mode: cperl; coding: utf-8; cperl-indent-level: 4 -*- | ||||
2 | # vim: ts=4 sts=4 sw=4: | ||||
3 | package CPAN::Prompt; | ||||
4 | use overload '""' => "as_string"; | ||||
5 | use vars qw($prompt); | ||||
6 | use vars qw( | ||||
7 | $VERSION | ||||
8 | ); | ||||
9 | $VERSION = "5.5"; | ||||
10 | |||||
11 | |||||
12 | $prompt = "cpan> "; | ||||
13 | $CPAN::CurrentCommandId ||= 0; | ||||
14 | # spent 10µs within CPAN::Prompt::new which was called:
# once (10µs+0s) by CPAN::shell at line 262 of CPAN.pm | ||||
15 | 1 | 6µs | bless {}, shift; | ||
16 | } | ||||
17 | # spent 64µs within CPAN::Prompt::as_string which was called 4 times, avg 16µs/call:
# 4 times (64µs+0s) by Term::ReadLine::Stub::CORE:print at line 217 of Term/ReadLine.pm, avg 16µs/call | ||||
18 | 4 | 7µs | my $word = "cpan"; | ||
19 | 4 | 6µs | unless ($CPAN::META->{LOCK}) { | ||
20 | $word = "nolock_cpan"; | ||||
21 | } | ||||
22 | 4 | 43µs | if ($CPAN::Config->{commandnumber_in_prompt}) { | ||
23 | 4 | 16µs | sprintf "$word\[%d]> ", $CPAN::CurrentCommandId; | ||
24 | } else { | ||||
25 | "$word> "; | ||||
26 | } | ||||
27 | } | ||||
28 | |||||
29 | 1; |