← 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:15 2017

Filename/usr/local/perls/perl-5.26.1/lib/5.26.1/CPAN/Distrostatus.pm
StatementsExecuted 4 statements in 121µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111132µs132µsCPAN::Distrostatus::::newCPAN::Distrostatus::new
0000s0sCPAN::Distrostatus::::BEGINCPAN::Distrostatus::BEGIN
0000s0sCPAN::Distrostatus::::as_stringCPAN::Distrostatus::as_string
0000s0sCPAN::Distrostatus::::commandidCPAN::Distrostatus::commandid
0000s0sCPAN::Distrostatus::::failedCPAN::Distrostatus::failed
0000s0sCPAN::Distrostatus::::something_has_just_failedCPAN::Distrostatus::something_has_just_failed
0000s0sCPAN::Distrostatus::::textCPAN::Distrostatus::text
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::Distrostatus;
4use overload '""' => "as_string",
5 fallback => 1;
6use vars qw($something_has_failed_at);
7use vars qw(
8 $VERSION
9);
10$VERSION = "5.5";
11
12
13
# spent 132µs within CPAN::Distrostatus::new which was called: # once (132µs+0s) by CPAN::Distribution::untar_me at line 1204 of CPAN/Distribution.pm
sub new {
14122µs my($class,$arg) = @_;
15143µs my $failed = substr($arg,0,2) eq "NO";
1610s if ($failed) {
17 $something_has_failed_at = $CPAN::CurrentCommandId;
18 }
19 bless {
20156µs TEXT => $arg,
21 FAILED => $failed,
22 COMMANDID => $CPAN::CurrentCommandId,
23 TIME => time,
24 }, $class;
25}
26sub something_has_just_failed () {
27 defined $something_has_failed_at &&
28 $something_has_failed_at == $CPAN::CurrentCommandId;
29}
30sub commandid { shift->{COMMANDID} }
31sub failed { shift->{FAILED} }
32sub text {
33 my($self,$set) = @_;
34 if (defined $set) {
35 $self->{TEXT} = $set;
36 }
37 $self->{TEXT};
38}
39sub as_string {
40 my($self) = @_;
41 $self->text;
42}
43
44
451;