| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm |
| Statements | Executed 643 statements in 12.0ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 13.1ms | 14.1ms | Attribute::Handlers::BEGIN@3 |
| 1 | 1 | 1 | 3.25ms | 4.86ms | Attribute::Handlers::BEGIN@110 |
| 1 | 1 | 1 | 1.85ms | 3.37ms | Attribute::Handlers::BEGIN@6 |
| 2 | 2 | 1 | 807µs | 807µs | Attribute::Handlers::findsym |
| 4 | 4 | 1 | 754µs | 1.76ms | Attribute::Handlers::_apply_handler_AH_ |
| 2 | 1 | 1 | 397µs | 663µs | Attribute::Handlers::__ANON__[:195] |
| 4 | 1 | 1 | 116µs | 116µs | Attribute::Handlers::_gen_handler_AH_ |
| 1 | 1 | 1 | 86µs | 1.81ms | Attribute::Handlers::CHECK |
| 1 | 1 | 1 | 72µs | 72µs | Attribute::Handlers::BEGIN@2 |
| 1 | 1 | 1 | 69µs | 139µs | Attribute::Handlers::_resolve_lastattr |
| 1 | 1 | 1 | 66µs | 66µs | Attribute::Handlers::_TEST_::MODIFY_CODE_ATTRIBUTES |
| 2 | 1 | 1 | 64µs | 64µs | Attribute::Handlers::CORE:match (opcode) |
| 1 | 1 | 1 | 49µs | 49µs | Attribute::Handlers::BEGIN@104 |
| 1 | 1 | 1 | 35µs | 102µs | Attribute::Handlers::BEGIN@215 |
| 1 | 1 | 1 | 34µs | 81µs | Attribute::Handlers::BEGIN@199 |
| 1 | 1 | 1 | 34µs | 61µs | Attribute::Handlers::BEGIN@4 |
| 1 | 1 | 1 | 33µs | 80µs | Attribute::Handlers::BEGIN@148 |
| 4 | 3 | 1 | 32µs | 32µs | Attribute::Handlers::__ANON__[:111] |
| 1 | 1 | 1 | 32µs | 78µs | Attribute::Handlers::BEGIN@15 |
| 1 | 1 | 1 | 30µs | 83µs | Attribute::Handlers::BEGIN@124 |
| 1 | 1 | 1 | 28µs | 48µs | Attribute::Handlers::END |
| 1 | 1 | 1 | 28µs | 38µs | Attribute::Handlers::BEGIN@17 |
| 1 | 1 | 1 | 28µs | 64µs | Attribute::Handlers::BEGIN@236 |
| 1 | 1 | 1 | 27µs | 43µs | Attribute::Handlers::INIT |
| 1 | 1 | 1 | 27µs | 44µs | Attribute::Handlers::BEGIN@5 |
| 2 | 2 | 1 | 17µs | 17µs | Attribute::Handlers::CORE:qr (opcode) |
| 1 | 1 | 1 | 14µs | 14µs | Attribute::Handlers::import |
| 5 | 5 | 1 | 11µs | 11µs | Attribute::Handlers::CORE:subst (opcode) |
| 0 | 0 | 0 | 0s | 0s | Attribute::Handlers::AUTOLOAD |
| 0 | 0 | 0 | 0s | 0s | Attribute::Handlers::_TEST_::t |
| 0 | 0 | 0 | 0s | 0s | Attribute::Handlers::_usage_AH_ |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Attribute::Handlers; | ||||
| 2 | 2 | 175µs | 1 | 72µs | # spent 72µs within Attribute::Handlers::BEGIN@2 which was called:
# once (72µs+0s) by App::Rad::Help::BEGIN@2 at line 2 # spent 72µs making 1 call to Attribute::Handlers::BEGIN@2 |
| 3 | 2 | 446µs | 2 | 14.4ms | # spent 14.1ms (13.1+1.02) within Attribute::Handlers::BEGIN@3 which was called:
# once (13.1ms+1.02ms) by App::Rad::Help::BEGIN@2 at line 3 # spent 14.1ms making 1 call to Attribute::Handlers::BEGIN@3
# spent 210µs making 1 call to Exporter::import |
| 4 | 2 | 97µs | 2 | 88µs | # spent 61µs (34+27) within Attribute::Handlers::BEGIN@4 which was called:
# once (34µs+27µs) by App::Rad::Help::BEGIN@2 at line 4 # spent 61µs making 1 call to Attribute::Handlers::BEGIN@4
# spent 27µs making 1 call to warnings::import |
| 5 | 2 | 114µs | 2 | 62µs | # spent 44µs (27+17) within Attribute::Handlers::BEGIN@5 which was called:
# once (27µs+17µs) by App::Rad::Help::BEGIN@2 at line 5 # spent 44µs making 1 call to Attribute::Handlers::BEGIN@5
# spent 17µs making 1 call to strict::import |
| 6 | 2 | 603µs | 2 | 3.54ms | # spent 3.37ms (1.85+1.52) within Attribute::Handlers::BEGIN@6 which was called:
# once (1.85ms+1.52ms) by App::Rad::Help::BEGIN@2 at line 6 # spent 3.37ms making 1 call to Attribute::Handlers::BEGIN@6
# spent 174µs making 1 call to vars::import |
| 7 | 1 | 2µs | $VERSION = '0.89'; # remember to update version in POD! | ||
| 8 | # $DB::single=1; | ||||
| 9 | |||||
| 10 | 1 | 1µs | my %symcache; | ||
| 11 | sub findsym { | ||||
| 12 | 504 | 825µs | my ($pkg, $ref, $type) = @_; | ||
| 13 | return $symcache{$pkg,$ref} if $symcache{$pkg,$ref}; | ||||
| 14 | $type ||= ref($ref); | ||||
| 15 | 2 | 137µs | 2 | 124µs | # spent 78µs (32+46) within Attribute::Handlers::BEGIN@15 which was called:
# once (32µs+46µs) by App::Rad::Help::BEGIN@2 at line 15 # spent 78µs making 1 call to Attribute::Handlers::BEGIN@15
# spent 46µs making 1 call to strict::unimport |
| 16 | foreach my $sym ( values %{$pkg."::"} ) { | ||||
| 17 | 2 | 2.09ms | 2 | 49µs | # spent 38µs (28+10) within Attribute::Handlers::BEGIN@17 which was called:
# once (28µs+10µs) by App::Rad::Help::BEGIN@2 at line 17 # spent 38µs making 1 call to Attribute::Handlers::BEGIN@17
# spent 10µs making 1 call to strict::import |
| 18 | next unless ref ( \$sym ) eq 'GLOB'; | ||||
| 19 | return $symcache{$pkg,$ref} = \$sym | ||||
| 20 | if *{$sym}{$type} && *{$sym}{$type} == $ref; | ||||
| 21 | } | ||||
| 22 | } | ||||
| 23 | |||||
| 24 | 1 | 25µs | my %validtype = ( | ||
| 25 | VAR => [qw[SCALAR ARRAY HASH]], | ||||
| 26 | ANY => [qw[SCALAR ARRAY HASH CODE]], | ||||
| 27 | "" => [qw[SCALAR ARRAY HASH CODE]], | ||||
| 28 | SCALAR => [qw[SCALAR]], | ||||
| 29 | ARRAY => [qw[ARRAY]], | ||||
| 30 | HASH => [qw[HASH]], | ||||
| 31 | CODE => [qw[CODE]], | ||||
| 32 | ); | ||||
| 33 | 1 | 500ns | my %lastattr; | ||
| 34 | 1 | 900ns | my @declarations; | ||
| 35 | 1 | 400ns | my %raw; | ||
| 36 | 1 | 300ns | my %phase; | ||
| 37 | 1 | 5µs | my %sigil = (SCALAR=>'$', ARRAY=>'@', HASH=>'%'); | ||
| 38 | 1 | 1µs | my $global_phase = 0; | ||
| 39 | 1 | 4µs | my %global_phases = ( | ||
| 40 | BEGIN => 0, | ||||
| 41 | CHECK => 1, | ||||
| 42 | INIT => 2, | ||||
| 43 | END => 3, | ||||
| 44 | ); | ||||
| 45 | 1 | 5µs | my @global_phases = qw(BEGIN CHECK INIT END); | ||
| 46 | |||||
| 47 | sub _usage_AH_ { | ||||
| 48 | croak "Usage: use $_[0] autotie => {AttrName => TieClassName,...}"; | ||||
| 49 | } | ||||
| 50 | |||||
| 51 | 1 | 34µs | 1 | 12µs | my $qual_id = qr/^[_a-z]\w*(::[_a-z]\w*)*$/i; # spent 12µs making 1 call to Attribute::Handlers::CORE:qr |
| 52 | |||||
| 53 | # spent 14µs within Attribute::Handlers::import which was called:
# once (14µs+0s) by App::Rad::Help::BEGIN@2 at line 2 of App/Rad/Help.pm | ||||
| 54 | 3 | 22µs | my $class = shift @_; | ||
| 55 | return unless $class eq "Attribute::Handlers"; | ||||
| 56 | while (@_) { | ||||
| 57 | my $cmd = shift; | ||||
| 58 | if ($cmd =~ /^autotie((?:ref)?)$/) { | ||||
| 59 | my $tiedata = ($1 ? '$ref, ' : '') . '@$data'; | ||||
| 60 | my $mapping = shift; | ||||
| 61 | _usage_AH_ $class unless ref($mapping) eq 'HASH'; | ||||
| 62 | while (my($attr, $tieclass) = each %$mapping) { | ||||
| 63 | $tieclass =~ s/^([_a-z]\w*(::[_a-z]\w*)*)(.*)/$1/is; | ||||
| 64 | my $args = $3||'()'; | ||||
| 65 | _usage_AH_ $class unless $attr =~ $qual_id | ||||
| 66 | && $tieclass =~ $qual_id | ||||
| 67 | && eval "use base q\0$tieclass\0; 1"; | ||||
| 68 | if ($tieclass->isa('Exporter')) { | ||||
| 69 | local $Exporter::ExportLevel = 2; | ||||
| 70 | $tieclass->import(eval $args); | ||||
| 71 | } | ||||
| 72 | $attr =~ s/__CALLER__/caller(1)/e; | ||||
| 73 | $attr = caller()."::".$attr unless $attr =~ /::/; | ||||
| 74 | eval qq{ | ||||
| 75 | sub $attr : ATTR(VAR) { | ||||
| 76 | my (\$ref, \$data) = \@_[2,4]; | ||||
| 77 | my \$was_arrayref = ref \$data eq 'ARRAY'; | ||||
| 78 | \$data = [ \$data ] unless \$was_arrayref; | ||||
| 79 | my \$type = ref(\$ref)||"value (".(\$ref||"<undef>").")"; | ||||
| 80 | (\$type eq 'SCALAR')? tie \$\$ref,'$tieclass',$tiedata | ||||
| 81 | :(\$type eq 'ARRAY') ? tie \@\$ref,'$tieclass',$tiedata | ||||
| 82 | :(\$type eq 'HASH') ? tie \%\$ref,'$tieclass',$tiedata | ||||
| 83 | : die "Can't autotie a \$type\n" | ||||
| 84 | } 1 | ||||
| 85 | } or die "Internal error: $@"; | ||||
| 86 | } | ||||
| 87 | } | ||||
| 88 | else { | ||||
| 89 | croak "Can't understand $_"; | ||||
| 90 | } | ||||
| 91 | } | ||||
| 92 | } | ||||
| 93 | |||||
| 94 | # On older perls, code attribute handlers run before the sub gets placed | ||||
| 95 | # in its package. Since the :ATTR handlers need to know the name of the | ||||
| 96 | # sub they're applied to, the name lookup (via findsym) needs to be | ||||
| 97 | # delayed: we do it immediately before we might need to find attribute | ||||
| 98 | # handlers from their name. However, on newer perls (which fix some | ||||
| 99 | # problems relating to attribute application), a sub gets placed in its | ||||
| 100 | # package before its attributes are processed. In this case, the | ||||
| 101 | # delayed name lookup might be too late, because the sub we're looking | ||||
| 102 | # for might have already been replaced. So we need to detect which way | ||||
| 103 | # round this perl does things, and time the name lookup accordingly. | ||||
| 104 | # spent 49µs within Attribute::Handlers::BEGIN@104 which was called:
# once (49µs+0s) by App::Rad::Help::BEGIN@2 at line 114 | ||||
| 105 | 4 | 45µs | my $delayed; | ||
| 106 | # spent 66µs within Attribute::Handlers::_TEST_::MODIFY_CODE_ATTRIBUTES which was called:
# once (66µs+0s) by attributes::import at line 55 of attributes.pm | ||||
| 107 | 2 | 72µs | $delayed = \&Attribute::Handlers::_TEST_::t != $_[1]; | ||
| 108 | return (); | ||||
| 109 | } | ||||
| 110 | 2 | 952µs | 2 | 5.64ms | # spent 4.86ms (3.25+1.61) within Attribute::Handlers::BEGIN@110 which was called:
# once (3.25ms+1.61ms) by App::Rad::Help::BEGIN@2 at line 110 # spent 4.86ms making 1 call to Attribute::Handlers::BEGIN@110
# spent 780µs making 1 call to attributes::import |
| 111 | 4 | 107µs | # spent 32µs within Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:111] which was called 4 times, avg 8µs/call:
# 2 times (13µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 142, avg 7µs/call
# once (13µs+0s) by Attribute::Handlers::CHECK at line 239
# once (6µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 167 | ||
| 112 | undef &Attribute::Handlers::_TEST_::MODIFY_CODE_ATTRIBUTES; | ||||
| 113 | undef &Attribute::Handlers::_TEST_::t; | ||||
| 114 | 1 | 427µs | 1 | 49µs | } # spent 49µs making 1 call to Attribute::Handlers::BEGIN@104 |
| 115 | |||||
| 116 | # spent 139µs (69+70) within Attribute::Handlers::_resolve_lastattr which was called:
# once (69µs+70µs) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 167 | ||||
| 117 | 7 | 69µs | return unless $lastattr{ref}; | ||
| 118 | 1 | 70µs | my $sym = findsym @lastattr{'pkg','ref'} # spent 70µs making 1 call to Attribute::Handlers::findsym | ||
| 119 | or die "Internal error: $lastattr{pkg} symbol went missing"; | ||||
| 120 | my $name = *{$sym}{NAME}; | ||||
| 121 | warn "Declaration of $name attribute in package $lastattr{pkg} may clash with future reserved word\n" | ||||
| 122 | if $^W and $name !~ /[A-Z]/; | ||||
| 123 | foreach ( @{$validtype{$lastattr{type}}} ) { | ||||
| 124 | 2 | 1.14ms | 2 | 135µs | # spent 83µs (30+53) within Attribute::Handlers::BEGIN@124 which was called:
# once (30µs+53µs) by App::Rad::Help::BEGIN@2 at line 124 # spent 83µs making 1 call to Attribute::Handlers::BEGIN@124
# spent 53µs making 1 call to strict::unimport |
| 125 | *{"$lastattr{pkg}::_ATTR_${_}_${name}"} = $lastattr{ref}; | ||||
| 126 | } | ||||
| 127 | %lastattr = (); | ||||
| 128 | } | ||||
| 129 | |||||
| 130 | sub AUTOLOAD { | ||||
| 131 | return if $AUTOLOAD =~ /::DESTROY$/; | ||||
| 132 | my ($class) = $AUTOLOAD =~ m/(.*)::/g; | ||||
| 133 | $AUTOLOAD =~ m/_ATTR_(.*?)_(.*)/ or | ||||
| 134 | croak "Can't locate class method '$AUTOLOAD' via package '$class'"; | ||||
| 135 | croak "Attribute handler '$2' doesn't handle $1 attributes"; | ||||
| 136 | } | ||||
| 137 | |||||
| 138 | 1 | 14µs | 1 | 5µs | my $builtin = qr/lvalue|method|locked|unique|shared/; # spent 5µs making 1 call to Attribute::Handlers::CORE:qr |
| 139 | |||||
| 140 | # spent 116µs within Attribute::Handlers::_gen_handler_AH_ which was called 4 times, avg 29µs/call:
# 4 times (116µs+0s) by App::Rad::Help::BEGIN@2 at line 201, avg 29µs/call | ||||
| 141 | # spent 663µs (397+266) within Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] which was called 2 times, avg 331µs/call:
# 2 times (397µs+266µs) by attributes::import at line 55 of attributes.pm, avg 331µs/call | ||||
| 142 | 39 | 432µs | 2 | 13µs | _resolve_lastattr if _delayed_name_resolution; # spent 13µs making 2 calls to Attribute::Handlers::__ANON__[Attribute/Handlers.pm:111], avg 7µs/call |
| 143 | my ($pkg, $ref, @attrs) = @_; | ||||
| 144 | my (undef, $filename, $linenum) = caller 2; | ||||
| 145 | foreach (@attrs) { | ||||
| 146 | 2 | 64µs | my ($attr, $data) = /^([a-z_]\w*)(?:[(](.*)[)])?$/is or next; # spent 64µs making 2 calls to Attribute::Handlers::CORE:match, avg 32µs/call | ||
| 147 | if ($attr eq 'ATTR') { | ||||
| 148 | 2 | 1.64ms | 2 | 126µs | # spent 80µs (33+47) within Attribute::Handlers::BEGIN@148 which was called:
# once (33µs+47µs) by App::Rad::Help::BEGIN@2 at line 148 # spent 80µs making 1 call to Attribute::Handlers::BEGIN@148
# spent 47µs making 1 call to strict::unimport |
| 149 | $data ||= "ANY"; | ||||
| 150 | 1 | 4µs | $raw{$ref} = $data =~ s/\s*,?\s*RAWDATA\s*,?\s*//; # spent 4µs making 1 call to Attribute::Handlers::CORE:subst | ||
| 151 | 1 | 1µs | $phase{$ref}{BEGIN} = 1 # spent 1µs making 1 call to Attribute::Handlers::CORE:subst | ||
| 152 | if $data =~ s/\s*,?\s*(BEGIN)\s*,?\s*//; | ||||
| 153 | 1 | 3µs | $phase{$ref}{INIT} = 1 # spent 3µs making 1 call to Attribute::Handlers::CORE:subst | ||
| 154 | if $data =~ s/\s*,?\s*(INIT)\s*,?\s*//; | ||||
| 155 | 1 | 2µs | $phase{$ref}{END} = 1 # spent 2µs making 1 call to Attribute::Handlers::CORE:subst | ||
| 156 | if $data =~ s/\s*,?\s*(END)\s*,?\s*//; | ||||
| 157 | $phase{$ref}{CHECK} = 1 | ||||
| 158 | if $data =~ s/\s*,?\s*(CHECK)\s*,?\s*// | ||||
| 159 | 1 | 1µs | || ! keys %{$phase{$ref}}; # spent 1µs making 1 call to Attribute::Handlers::CORE:subst | ||
| 160 | # Added for cleanup to not pollute next call. | ||||
| 161 | (%lastattr = ()), | ||||
| 162 | croak "Can't have two ATTR specifiers on one subroutine" | ||||
| 163 | if keys %lastattr; | ||||
| 164 | croak "Bad attribute type: ATTR($data)" | ||||
| 165 | unless $validtype{$data}; | ||||
| 166 | %lastattr=(pkg=>$pkg,ref=>$ref,type=>$data); | ||||
| 167 | 2 | 145µs | _resolve_lastattr unless _delayed_name_resolution; # spent 139µs making 1 call to Attribute::Handlers::_resolve_lastattr
# spent 6µs making 1 call to Attribute::Handlers::__ANON__[Attribute/Handlers.pm:111] | ||
| 168 | } | ||||
| 169 | else { | ||||
| 170 | my $type = ref $ref; | ||||
| 171 | 1 | 11µs | my $handler = $pkg->can("_ATTR_${type}_${attr}"); # spent 11µs making 1 call to UNIVERSAL::can | ||
| 172 | next unless $handler; | ||||
| 173 | my $decl = [$pkg, $ref, $attr, $data, | ||||
| 174 | $raw{$handler}, $phase{$handler}, $filename, $linenum]; | ||||
| 175 | foreach my $gphase (@global_phases) { | ||||
| 176 | 1 | 22µs | _apply_handler_AH_($decl,$gphase) # spent 22µs making 1 call to Attribute::Handlers::_apply_handler_AH_ | ||
| 177 | if $global_phases{$gphase} <= $global_phase; | ||||
| 178 | } | ||||
| 179 | if ($global_phase != 0) { | ||||
| 180 | # if _gen_handler_AH_ is being called after | ||||
| 181 | # CHECK it's for a lexical, so make sure | ||||
| 182 | # it didn't want to run anything later | ||||
| 183 | |||||
| 184 | local $Carp::CarpLevel = 2; | ||||
| 185 | carp "Won't be able to apply END handler" | ||||
| 186 | if $phase{$handler}{END}; | ||||
| 187 | } | ||||
| 188 | else { | ||||
| 189 | push @declarations, $decl | ||||
| 190 | } | ||||
| 191 | } | ||||
| 192 | $_ = undef; | ||||
| 193 | } | ||||
| 194 | return grep {defined && !/$builtin/} @attrs; | ||||
| 195 | } | ||||
| 196 | 4 | 138µs | } | ||
| 197 | |||||
| 198 | { | ||||
| 199 | 3 | 592µs | 2 | 128µs | # spent 81µs (34+47) within Attribute::Handlers::BEGIN@199 which was called:
# once (34µs+47µs) by App::Rad::Help::BEGIN@2 at line 199 # spent 81µs making 1 call to Attribute::Handlers::BEGIN@199
# spent 47µs making 1 call to strict::unimport |
| 200 | *{"Attribute::Handlers::UNIVERSAL::MODIFY_${_}_ATTRIBUTES"} = | ||||
| 201 | 1 | 88µs | 4 | 116µs | _gen_handler_AH_ foreach @{$validtype{ANY}}; # spent 116µs making 4 calls to Attribute::Handlers::_gen_handler_AH_, avg 29µs/call |
| 202 | } | ||||
| 203 | 1 | 36µs | push @UNIVERSAL::ISA, 'Attribute::Handlers::UNIVERSAL' | ||
| 204 | unless grep /^Attribute::Handlers::UNIVERSAL$/, @UNIVERSAL::ISA; | ||||
| 205 | |||||
| 206 | # spent 1.76ms (754µs+1.01) within Attribute::Handlers::_apply_handler_AH_ which was called 4 times, avg 441µs/call:
# once (698µs+1.01ms) by Attribute::Handlers::CHECK at line 241
# once (22µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 176
# once (19µs+0s) by Attribute::Handlers::END at line 256
# once (16µs+0s) by Attribute::Handlers::INIT at line 248 | ||||
| 207 | 22 | 398µs | my ($declaration, $phase) = @_; | ||
| 208 | my ($pkg, $ref, $attr, $data, $raw, $handlerphase, $filename, $linenum) = @$declaration; | ||||
| 209 | return unless $handlerphase->{$phase}; | ||||
| 210 | # print STDERR "Handling $attr on $ref in $phase with [$data]\n"; | ||||
| 211 | my $type = ref $ref; | ||||
| 212 | my $handler = "_ATTR_${type}_${attr}"; | ||||
| 213 | 1 | 737µs | my $sym = findsym($pkg, $ref); # spent 737µs making 1 call to Attribute::Handlers::findsym | ||
| 214 | $sym ||= $type eq 'CODE' ? 'ANON' : 'LEXICAL'; | ||||
| 215 | 2 | 474µs | 2 | 168µs | # spent 102µs (35+66) within Attribute::Handlers::BEGIN@215 which was called:
# once (35µs+66µs) by App::Rad::Help::BEGIN@2 at line 215 # spent 102µs making 1 call to Attribute::Handlers::BEGIN@215
# spent 66µs making 1 call to warnings::unimport |
| 216 | if (!$raw && defined($data)) { | ||||
| 217 | if ($data ne '') { | ||||
| 218 | my $evaled = eval("package $pkg; no warnings; no strict; # spent 402µs executing statements in string eval # includes 96µs spent executing 2 calls to 3 subs defined therein. | ||||
| 219 | local \$SIG{__WARN__}=sub{die}; [$data]"); | ||||
| 220 | $data = $evaled unless $@; | ||||
| 221 | } | ||||
| 222 | else { $data = undef } | ||||
| 223 | } | ||||
| 224 | $pkg->$handler($sym, | ||||
| 225 | 1 | 26µs | (ref $sym eq 'GLOB' ? *{$sym}{ref $ref}||$ref : $ref), # spent 26µs making 1 call to UNIVERSAL::Help | ||
| 226 | $attr, | ||||
| 227 | $data, | ||||
| 228 | $phase, | ||||
| 229 | $filename, | ||||
| 230 | $linenum, | ||||
| 231 | ); | ||||
| 232 | return 1; | ||||
| 233 | } | ||||
| 234 | |||||
| 235 | { | ||||
| 236 | 3 | 634µs | 2 | 100µs | # spent 64µs (28+36) within Attribute::Handlers::BEGIN@236 which was called:
# once (28µs+36µs) by App::Rad::Help::BEGIN@2 at line 236 # spent 64µs making 1 call to Attribute::Handlers::BEGIN@236
# spent 36µs making 1 call to warnings::unimport |
| 237 | # spent 1.81ms (86µs+1.72) within Attribute::Handlers::CHECK which was called:
# once (86µs+1.72ms) by main::RUNTIME at line 0 of bin/dpath | ||||
| 238 | 4 | 41µs | $global_phase++; | ||
| 239 | 1 | 13µs | _resolve_lastattr if _delayed_name_resolution; # spent 13µs making 1 call to Attribute::Handlers::__ANON__[Attribute/Handlers.pm:111] | ||
| 240 | foreach my $decl (@declarations) { | ||||
| 241 | 1 | 1.71ms | _apply_handler_AH_($decl, 'CHECK'); # spent 1.71ms making 1 call to Attribute::Handlers::_apply_handler_AH_ | ||
| 242 | } | ||||
| 243 | } | ||||
| 244 | |||||
| 245 | # spent 43µs (27+16) within Attribute::Handlers::INIT which was called:
# once (27µs+16µs) by main::RUNTIME at line 0 of bin/dpath | ||||
| 246 | 3 | 24µs | $global_phase++; | ||
| 247 | foreach my $decl (@declarations) { | ||||
| 248 | 1 | 16µs | _apply_handler_AH_($decl, 'INIT'); # spent 16µs making 1 call to Attribute::Handlers::_apply_handler_AH_ | ||
| 249 | } | ||||
| 250 | } | ||||
| 251 | } | ||||
| 252 | |||||
| 253 | # spent 48µs (28+19) within Attribute::Handlers::END which was called:
# once (28µs+19µs) by main::RUNTIME at line 0 of bin/dpath | ||||
| 254 | 3 | 27µs | $global_phase++; | ||
| 255 | foreach my $decl (@declarations) { | ||||
| 256 | 1 | 19µs | _apply_handler_AH_($decl, 'END'); # spent 19µs making 1 call to Attribute::Handlers::_apply_handler_AH_ | ||
| 257 | } | ||||
| 258 | } | ||||
| 259 | |||||
| 260 | 1 | 65µs | 1; | ||
| 261 | __END__ | ||||
# spent 64µs within Attribute::Handlers::CORE:match which was called 2 times, avg 32µs/call:
# 2 times (64µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 146, avg 32µs/call | |||||
sub Attribute::Handlers::CORE:qr; # opcode | |||||
# spent 11µs within Attribute::Handlers::CORE:subst which was called 5 times, avg 2µs/call:
# once (4µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 150
# once (3µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 153
# once (2µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 155
# once (1µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 151
# once (1µs+0s) by Attribute::Handlers::__ANON__[/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/Attribute/Handlers.pm:195] at line 159 |