← Index
NYTProf Performance Profile   « line view »
For /Users/brian/bin/perls/cpan5.26.1
  Run on Sat Dec 30 01:41:10 2017
Reported on Sat Dec 30 01:44:14 2017

Filename/usr/local/perls/perl-5.26.1/lib/5.26.1/CPAN/Prompt.pm
StatementsExecuted 17 statements in 78µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
41164µs64µsCPAN::Prompt::::as_stringCPAN::Prompt::as_string
11110µs10µsCPAN::Prompt::::newCPAN::Prompt::new
0000s0sCPAN::Prompt::::BEGINCPAN::Prompt::BEGIN
Call graph for these subroutines as a Graphviz dot language file.
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:
3package CPAN::Prompt;
4use overload '""' => "as_string";
5use vars qw($prompt);
6use 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
sub new {
1516µ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
sub as_string {
1847µs my $word = "cpan";
1946µs unless ($CPAN::META->{LOCK}) {
20 $word = "nolock_cpan";
21 }
22443µs if ($CPAN::Config->{commandnumber_in_prompt}) {
23416µs sprintf "$word\[%d]> ", $CPAN::CurrentCommandId;
24 } else {
25 "$word> ";
26 }
27}
28
291;