| File | /usr/lib/perl5/5.10.1/i386-linux-thread-multi/Scalar/Util.pm |
| Statements Executed | 14 |
| Statement Execution Time | 5.38ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 18970 | 93 | 49 | 107ms | 107ms | Scalar::Util::blessed (xsub) |
| 1895 | 18 | 17 | 12.4ms | 12.4ms | Scalar::Util::weaken (xsub) |
| 1715 | 11 | 10 | 8.85ms | 8.85ms | Scalar::Util::reftype (xsub) |
| 1 | 1 | 1 | 1.83ms | 3.56ms | Scalar::Util::BEGIN@10 |
| 228 | 11 | 7 | 1.03ms | 1.03ms | Scalar::Util::refaddr (xsub) |
| 31 | 2 | 3 | 186µs | 186µs | Scalar::Util::looks_like_number (xsub) |
| 1 | 1 | 1 | 49µs | 62µs | Scalar::Util::BEGIN@9 |
| 1 | 1 | 2 | 8µs | 8µs | Scalar::Util::set_prototype (xsub) |
| 0 | 0 | 0 | 0s | 0s | Scalar::Util::export_fail |
| 0 | 0 | 0 | 0s | 0s | Scalar::Util::openhandle |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | # Scalar::Util.pm | ||||
| 2 | # | ||||
| 3 | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
| 4 | # This program is free software; you can redistribute it and/or | ||||
| 5 | # modify it under the same terms as Perl itself. | ||||
| 6 | |||||
| 7 | package Scalar::Util; | ||||
| 8 | |||||
| 9 | 3 | 235µs | 2 | 75µs | # spent 62µs (49+13) within Scalar::Util::BEGIN@9 which was called
# once (49µs+13µs) by Moose::BEGIN@11 at line 9 # spent 62µs making 1 call to Scalar::Util::BEGIN@9
# spent 13µs making 1 call to strict::import |
| 10 | 3 | 2.13ms | 2 | 3.83ms | # spent 3.56ms (1.83+1.73) within Scalar::Util::BEGIN@10 which was called
# once (1.83ms+1.73ms) by Moose::BEGIN@11 at line 10 # spent 3.56ms making 1 call to Scalar::Util::BEGIN@10
# spent 271µs making 1 call to vars::import |
| 11 | 1 | 2.51ms | require Exporter; | ||
| 12 | 1 | 336µs | require List::Util; # List::Util loads the XS | ||
| 13 | |||||
| 14 | 1 | 21µs | @ISA = qw(Exporter); | ||
| 15 | 1 | 60µs | @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype); | ||
| 16 | 1 | 3µs | $VERSION = "1.21"; | ||
| 17 | 1 | 62µs | $VERSION = eval $VERSION; | ||
| 18 | |||||
| 19 | 1 | 2µs | unless (defined &dualvar) { | ||
| 20 | # Load Pure Perl version if XS not loaded | ||||
| 21 | require Scalar::Util::PP; | ||||
| 22 | Scalar::Util::PP->import; | ||||
| 23 | push @EXPORT_FAIL, qw(weaken isweak dualvar isvstring set_prototype); | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | sub export_fail { | ||||
| 27 | if (grep { /dualvar/ } @EXPORT_FAIL) { # no XS loaded | ||||
| 28 | my $pat = join("|", @EXPORT_FAIL); | ||||
| 29 | if (my ($err) = grep { /^($pat)$/ } @_ ) { | ||||
| 30 | require Carp; | ||||
| 31 | Carp::croak("$err is only available with the XS version of Scalar::Util"); | ||||
| 32 | } | ||||
| 33 | } | ||||
| 34 | |||||
| 35 | if (grep { /^(weaken|isweak)$/ } @_ ) { | ||||
| 36 | require Carp; | ||||
| 37 | Carp::croak("Weak references are not implemented in the version of perl"); | ||||
| 38 | } | ||||
| 39 | |||||
| 40 | if (grep { /^(isvstring)$/ } @_ ) { | ||||
| 41 | require Carp; | ||||
| 42 | Carp::croak("Vstrings are not implemented in the version of perl"); | ||||
| 43 | } | ||||
| 44 | |||||
| 45 | @_; | ||||
| 46 | } | ||||
| 47 | |||||
| 48 | sub openhandle ($) { | ||||
| 49 | my $fh = shift; | ||||
| 50 | my $rt = reftype($fh) || ''; | ||||
| 51 | |||||
| 52 | return defined(fileno($fh)) ? $fh : undef | ||||
| 53 | if $rt eq 'IO'; | ||||
| 54 | |||||
| 55 | if (reftype(\$fh) eq 'GLOB') { # handle openhandle(*DATA) | ||||
| 56 | $fh = \(my $tmp=$fh); | ||||
| 57 | } | ||||
| 58 | elsif ($rt ne 'GLOB') { | ||||
| 59 | return undef; | ||||
| 60 | } | ||||
| 61 | |||||
| 62 | (tied(*$fh) or defined(fileno($fh))) | ||||
| 63 | ? $fh : undef; | ||||
| 64 | } | ||||
| 65 | |||||
| 66 | 1 | 25µs | 1; | ||
| 67 | |||||
| 68 | __END__ | ||||
| 69 | |||||
| 70 | =head1 NAME | ||||
| 71 | |||||
| 72 | Scalar::Util - A selection of general-utility scalar subroutines | ||||
| 73 | |||||
| 74 | =head1 SYNOPSIS | ||||
| 75 | |||||
| 76 | use Scalar::Util qw(blessed dualvar isweak readonly refaddr reftype tainted | ||||
| 77 | weaken isvstring looks_like_number set_prototype); | ||||
| 78 | # and other useful utils appearing below | ||||
| 79 | |||||
| 80 | =head1 DESCRIPTION | ||||
| 81 | |||||
| 82 | C<Scalar::Util> contains a selection of subroutines that people have | ||||
| 83 | expressed would be nice to have in the perl core, but the usage would | ||||
| 84 | not really be high enough to warrant the use of a keyword, and the size | ||||
| 85 | so small such that being individual extensions would be wasteful. | ||||
| 86 | |||||
| 87 | By default C<Scalar::Util> does not export any subroutines. The | ||||
| 88 | subroutines defined are | ||||
| 89 | |||||
| 90 | =over 4 | ||||
| 91 | |||||
| 92 | =item blessed EXPR | ||||
| 93 | |||||
| 94 | If EXPR evaluates to a blessed reference the name of the package | ||||
| 95 | that it is blessed into is returned. Otherwise C<undef> is returned. | ||||
| 96 | |||||
| 97 | $scalar = "foo"; | ||||
| 98 | $class = blessed $scalar; # undef | ||||
| 99 | |||||
| 100 | $ref = []; | ||||
| 101 | $class = blessed $ref; # undef | ||||
| 102 | |||||
| 103 | $obj = bless [], "Foo"; | ||||
| 104 | $class = blessed $obj; # "Foo" | ||||
| 105 | |||||
| 106 | =item dualvar NUM, STRING | ||||
| 107 | |||||
| 108 | Returns a scalar that has the value NUM in a numeric context and the | ||||
| 109 | value STRING in a string context. | ||||
| 110 | |||||
| 111 | $foo = dualvar 10, "Hello"; | ||||
| 112 | $num = $foo + 2; # 12 | ||||
| 113 | $str = $foo . " world"; # Hello world | ||||
| 114 | |||||
| 115 | =item isvstring EXPR | ||||
| 116 | |||||
| 117 | If EXPR is a scalar which was coded as a vstring the result is true. | ||||
| 118 | |||||
| 119 | $vs = v49.46.48; | ||||
| 120 | $fmt = isvstring($vs) ? "%vd" : "%s"; #true | ||||
| 121 | printf($fmt,$vs); | ||||
| 122 | |||||
| 123 | =item isweak EXPR | ||||
| 124 | |||||
| 125 | If EXPR is a scalar which is a weak reference the result is true. | ||||
| 126 | |||||
| 127 | $ref = \$foo; | ||||
| 128 | $weak = isweak($ref); # false | ||||
| 129 | weaken($ref); | ||||
| 130 | $weak = isweak($ref); # true | ||||
| 131 | |||||
| 132 | B<NOTE>: Copying a weak reference creates a normal, strong, reference. | ||||
| 133 | |||||
| 134 | $copy = $ref; | ||||
| 135 | $weak = isweak($copy); # false | ||||
| 136 | |||||
| 137 | =item looks_like_number EXPR | ||||
| 138 | |||||
| 139 | Returns true if perl thinks EXPR is a number. See | ||||
| 140 | L<perlapi/looks_like_number>. | ||||
| 141 | |||||
| 142 | =item openhandle FH | ||||
| 143 | |||||
| 144 | Returns FH if FH may be used as a filehandle and is open, or FH is a tied | ||||
| 145 | handle. Otherwise C<undef> is returned. | ||||
| 146 | |||||
| 147 | $fh = openhandle(*STDIN); # \*STDIN | ||||
| 148 | $fh = openhandle(\*STDIN); # \*STDIN | ||||
| 149 | $fh = openhandle(*NOTOPEN); # undef | ||||
| 150 | $fh = openhandle("scalar"); # undef | ||||
| 151 | |||||
| 152 | =item readonly SCALAR | ||||
| 153 | |||||
| 154 | Returns true if SCALAR is readonly. | ||||
| 155 | |||||
| 156 | sub foo { readonly($_[0]) } | ||||
| 157 | |||||
| 158 | $readonly = foo($bar); # false | ||||
| 159 | $readonly = foo(0); # true | ||||
| 160 | |||||
| 161 | =item refaddr EXPR | ||||
| 162 | |||||
| 163 | If EXPR evaluates to a reference the internal memory address of | ||||
| 164 | the referenced value is returned. Otherwise C<undef> is returned. | ||||
| 165 | |||||
| 166 | $addr = refaddr "string"; # undef | ||||
| 167 | $addr = refaddr \$var; # eg 12345678 | ||||
| 168 | $addr = refaddr []; # eg 23456784 | ||||
| 169 | |||||
| 170 | $obj = bless {}, "Foo"; | ||||
| 171 | $addr = refaddr $obj; # eg 88123488 | ||||
| 172 | |||||
| 173 | =item reftype EXPR | ||||
| 174 | |||||
| 175 | If EXPR evaluates to a reference the type of the variable referenced | ||||
| 176 | is returned. Otherwise C<undef> is returned. | ||||
| 177 | |||||
| 178 | $type = reftype "string"; # undef | ||||
| 179 | $type = reftype \$var; # SCALAR | ||||
| 180 | $type = reftype []; # ARRAY | ||||
| 181 | |||||
| 182 | $obj = bless {}, "Foo"; | ||||
| 183 | $type = reftype $obj; # HASH | ||||
| 184 | |||||
| 185 | =item set_prototype CODEREF, PROTOTYPE | ||||
| 186 | |||||
| 187 | Sets the prototype of the given function, or deletes it if PROTOTYPE is | ||||
| 188 | undef. Returns the CODEREF. | ||||
| 189 | |||||
| 190 | set_prototype \&foo, '$$'; | ||||
| 191 | |||||
| 192 | =item tainted EXPR | ||||
| 193 | |||||
| 194 | Return true if the result of EXPR is tainted | ||||
| 195 | |||||
| 196 | $taint = tainted("constant"); # false | ||||
| 197 | $taint = tainted($ENV{PWD}); # true if running under -T | ||||
| 198 | |||||
| 199 | =item weaken REF | ||||
| 200 | |||||
| 201 | REF will be turned into a weak reference. This means that it will not | ||||
| 202 | hold a reference count on the object it references. Also when the reference | ||||
| 203 | count on that object reaches zero, REF will be set to undef. | ||||
| 204 | |||||
| 205 | This is useful for keeping copies of references , but you don't want to | ||||
| 206 | prevent the object being DESTROY-ed at its usual time. | ||||
| 207 | |||||
| 208 | { | ||||
| 209 | my $var; | ||||
| 210 | $ref = \$var; | ||||
| 211 | weaken($ref); # Make $ref a weak reference | ||||
| 212 | } | ||||
| 213 | # $ref is now undef | ||||
| 214 | |||||
| 215 | Note that if you take a copy of a scalar with a weakened reference, | ||||
| 216 | the copy will be a strong reference. | ||||
| 217 | |||||
| 218 | my $var; | ||||
| 219 | my $foo = \$var; | ||||
| 220 | weaken($foo); # Make $foo a weak reference | ||||
| 221 | my $bar = $foo; # $bar is now a strong reference | ||||
| 222 | |||||
| 223 | This may be less obvious in other situations, such as C<grep()>, for instance | ||||
| 224 | when grepping through a list of weakened references to objects that may have | ||||
| 225 | been destroyed already: | ||||
| 226 | |||||
| 227 | @object = grep { defined } @object; | ||||
| 228 | |||||
| 229 | This will indeed remove all references to destroyed objects, but the remaining | ||||
| 230 | references to objects will be strong, causing the remaining objects to never | ||||
| 231 | be destroyed because there is now always a strong reference to them in the | ||||
| 232 | @object array. | ||||
| 233 | |||||
| 234 | =back | ||||
| 235 | |||||
| 236 | =head1 DIAGNOSTICS | ||||
| 237 | |||||
| 238 | Module use may give one of the following errors during import. | ||||
| 239 | |||||
| 240 | =over | ||||
| 241 | |||||
| 242 | =item Weak references are not implemented in the version of perl | ||||
| 243 | |||||
| 244 | The version of perl that you are using does not implement weak references, to use | ||||
| 245 | C<isweak> or C<weaken> you will need to use a newer release of perl. | ||||
| 246 | |||||
| 247 | =item Vstrings are not implemented in the version of perl | ||||
| 248 | |||||
| 249 | The version of perl that you are using does not implement Vstrings, to use | ||||
| 250 | C<isvstring> you will need to use a newer release of perl. | ||||
| 251 | |||||
| 252 | =item C<NAME> is only available with the XS version of Scalar::Util | ||||
| 253 | |||||
| 254 | C<Scalar::Util> contains both perl and C implementations of many of its functions | ||||
| 255 | so that those without access to a C compiler may still use it. However some of the functions | ||||
| 256 | are only available when a C compiler was available to compile the XS version of the extension. | ||||
| 257 | |||||
| 258 | At present that list is: weaken, isweak, dualvar, isvstring, set_prototype | ||||
| 259 | |||||
| 260 | =back | ||||
| 261 | |||||
| 262 | =head1 KNOWN BUGS | ||||
| 263 | |||||
| 264 | There is a bug in perl5.6.0 with UV's that are >= 1<<31. This will | ||||
| 265 | show up as tests 8 and 9 of dualvar.t failing | ||||
| 266 | |||||
| 267 | =head1 SEE ALSO | ||||
| 268 | |||||
| 269 | L<List::Util> | ||||
| 270 | |||||
| 271 | =head1 COPYRIGHT | ||||
| 272 | |||||
| 273 | Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved. | ||||
| 274 | This program is free software; you can redistribute it and/or modify it | ||||
| 275 | under the same terms as Perl itself. | ||||
| 276 | |||||
| 277 | Except weaken and isweak which are | ||||
| 278 | |||||
| 279 | Copyright (c) 1999 Tuomas J. Lukka <lukka@iki.fi>. All rights reserved. | ||||
| 280 | This program is free software; you can redistribute it and/or modify it | ||||
| 281 | under the same terms as perl itself. | ||||
| 282 | |||||
| 283 | =cut | ||||
# spent 107ms within Scalar::Util::blessed which was called 18970 times, avg 6µs/call:
# 4637 times (26.4ms+0s) by Class::MOP::Mixin::HasMethods::get_method at line 113 of Class/MOP/Mixin/HasMethods.pm, avg 6µs/call
# 4637 times (18.2ms+0s) by Class::MOP::Mixin::HasMethods::get_method at line 115 of Class/MOP/Mixin/HasMethods.pm, avg 4µs/call
# 1771 times (7.50ms+0s) by Class::MOP::class_of at line 60 of Class/MOP.pm, avg 4µs/call
# 943 times (4.75ms+0s) by Class::MOP::Mixin::HasMethods::add_method at line 43 of Class/MOP/Mixin/HasMethods.pm, avg 5µs/call
# 861 times (6.65ms+0s) by Catalyst::uri_for at line 1271 of Catalyst.pm, avg 8µs/call
# 861 times (4.87ms+0s) by Catalyst::uri_for at line 1287 of Catalyst.pm, avg 6µs/call
# 861 times (3.33ms+0s) by Catalyst::uri_for at line 1291 of Catalyst.pm, avg 4µs/call
# 537 times (2.71ms+0s) by Class::MOP::Object::meta at line 17 of Class/MOP/Object.pm, avg 5µs/call
# 377 times (2.28ms+0s) by Class::MOP::Method::wrap at line 31 of Class/MOP/Method.pm, avg 6µs/call
# 305 times (1.90ms+0s) by Class::MOP::Method::Accessor::new at line 26 of Class/MOP/Method/Accessor.pm, avg 6µs/call
# 292 times (1.51ms+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 255 of Moose/Util/TypeConstraints.pm, avg 5µs/call
# 259 times (2.25ms+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 21 of Class/MOP/Mixin/HasAttributes.pm, avg 9µs/call
# 234 times (1.33ms+0s) by Class::MOP::Attribute::attach_to_class at line 230 of Class/MOP/Attribute.pm, avg 6µs/call
# 231 times (12.2ms+0s) by Catalyst::Component::config at line 128 of Catalyst/Component.pm, avg 53µs/call
# 214 times (1.01ms+0s) by Class::MOP::Class::clone_object at line 404 of Class/MOP/Class.pm, avg 5µs/call
# 214 times (929µs+0s) by Class::MOP::Class::_clone_instance at line 417 of Class/MOP/Class.pm, avg 4µs/call
# 163 times (761µs+0s) by Moose::Meta::Role::does_role at line 377 of Moose/Meta/Role.pm, avg 5µs/call
# 158 times (1.10ms+0s) by Class::MOP::Instance::BUILDARGS at line 18 of Class/MOP/Instance.pm, avg 7µs/call
# 119 times (457µs+0s) by Moose::Meta::Class::add_attribute at line 296 of Moose/Meta/Class.pm, avg 4µs/call
# 111 times (484µs+0s) by Catalyst::Action::DESTROY or Catalyst::Action::new or Catalyst::ActionContainer::new or Catalyst::Controller::new or Catalyst::DispatchType::Default::new or Catalyst::DispatchType::Index::new or Catalyst::DispatchType::Path::new or Catalyst::DispatchType::Regex::new or Catalyst::Dispatcher::new or Catalyst::Exception::Detach::new or Catalyst::Exception::Go::new or Catalyst::Request::DESTROY or Catalyst::Request::new or Catalyst::Response::DESTROY or Catalyst::Response::new or Catalyst::Stats::DESTROY or Catalyst::Stats::new or Catalyst::View::new or Data::Visitor::Callback::DESTROY or Data::Visitor::Callback::new or Epoll::DESTROY or Epoll::new at line 2 of generated method (unknown origin), avg 4µs/call
# 104 times (397µs+0s) by Class::MOP::Method::Wrapped::wrap at line 74 of Class/MOP/Method/Wrapped.pm, avg 4µs/call
# 82 times (504µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 47 of Moose/Meta/TypeConstraint/Registry.pm, avg 6µs/call
# 64 times (377µs+0s) by MooseX::Types::TypeDecorator::__type_constraint at line 97 of MooseX/Types/TypeDecorator.pm, avg 6µs/call
# 55 times (408µs+0s) by Moose::Meta::Role::Application::RoleSummation::meta or Moose::Meta::Role::Application::ToClass::meta or Moose::Meta::Role::Application::ToInstance::meta or Moose::Meta::Role::Application::ToRole::meta or Moose::Meta::Role::Application::meta or Moose::Meta::Role::Composite::meta or Moose::Meta::Role::Method::Required::meta or Moose::Meta::Role::meta or Moose::Meta::TypeCoercion::Union::meta or Moose::Meta::TypeCoercion::meta or Moose::Meta::TypeConstraint::Class::meta or Moose::Meta::TypeConstraint::DuckType::meta or Moose::Meta::TypeConstraint::Enum::meta or Moose::Meta::TypeConstraint::Parameterizable::meta or Moose::Meta::TypeConstraint::Parameterized::meta or Moose::Meta::TypeConstraint::Registry::meta or Moose::Meta::TypeConstraint::Role::meta or Moose::Meta::TypeConstraint::Union::meta or Moose::Meta::TypeConstraint::meta at line 50 of metaclass.pm, avg 7µs/call
# 41 times (253µs+0s) by Moose::Util::_apply_all_roles at line 104 of Moose/Util.pm, avg 6µs/call
# 40 times (223µs+0s) by Class::MOP::Mixin::meta at line 14 of Class/MOP/Mixin.pm, avg 6µs/call
# 37 times (183µs+0s) by Moose::Util::_apply_all_roles at line 128 of Moose/Util.pm, avg 5µs/call
# 37 times (151µs+0s) by Moose::Meta::Role::apply at line 404 of Moose/Meta/Role.pm, avg 4µs/call
# 31 times (162µs+0s) by Class::MOP::Method::Constructor::new at line 20 of Class/MOP/Method/Constructor.pm, avg 5µs/call
# 27 times (130µs+0s) by Data::Visitor::visit_no_rec_check at line 104 of Data/Visitor.pm, avg 5µs/call
# 27 times (115µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 58 of Moose/Meta/Method/Destructor.pm, avg 4µs/call
# 26 times (188µs+0s) by Moose::Meta::Class::add_role at line 188 of Moose/Meta/Class.pm, avg 7µs/call
# 26 times (158µs+0s) by Moose::Meta::Class::add_role_application at line 201 of Moose/Meta/Class.pm, avg 6µs/call
# 26 times (100µs+0s) by overload::AddrRef at line 95 of overload.pm, avg 4µs/call
# 25 times (107µs+0s) by Moose::Meta::Role::add_attribute at line 196 of Moose/Meta/Role.pm, avg 4µs/call
# 25 times (96µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 55 of Moose/Meta/Role/Attribute.pm, avg 4µs/call
# 23 times (114µs+0s) by MooseX::Types::TypeDecorator::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/MooseX/Types/TypeDecorator.pm:21] at line 16 of MooseX/Types/TypeDecorator.pm, avg 5µs/call
# 22 times (103µs+0s) by Moose::Meta::Attribute::_process_options at line 303 of Moose/Meta/Attribute.pm, avg 5µs/call
# 21 times (245µs+0s) by MooseX::Types::TypeDecorator::isa at line 115 of MooseX/Types/TypeDecorator.pm, avg 12µs/call
# 19 times (317µs+0s) by Moose::Meta::Role::add_required_methods at line 215 of Moose/Meta/Role.pm, avg 17µs/call
# 18 times (107µs+0s) by Class::MOP::Package::reinitialize at line 50 of Class/MOP/Package.pm, avg 6µs/call
# 18 times (90µs+0s) by Moose::Meta::Role::Application::RoleSummation::get_method_aliases_for_role at line 38 of Moose/Meta/Role/Application/RoleSummation.pm, avg 5µs/call
# 18 times (81µs+0s) by Template::Context::template at line 87 of Template/Context.pm, avg 4µs/call
# 18 times (64µs+0s) by Class::MOP::Package::reinitialize at line 54 of Class/MOP/Package.pm, avg 4µs/call
# 17 times (85µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 523 of Moose/Util/TypeConstraints.pm, avg 5µs/call
# 16 times (34µs+0s) by Catalyst::ClassData::mk_classdata at line 10 of Catalyst/ClassData.pm, avg 2µs/call
# 15 times (105µs+0s) by Moose::Meta::Class::reinitialize at line 145 of Moose/Meta/Class.pm, avg 7µs/call
# 15 times (88µs+0s) by Catalyst::Request::header or Catalyst::Response::content_length or Catalyst::Response::content_type or Catalyst::Stats::accept or Catalyst::Stats::traverse at line 92 of Moose/Meta/Method/Delegation.pm, avg 6µs/call
# 14 times (100µs+0s) by Moose::Meta::Method::Delegation::_get_delegate_accessor at line 129 of Moose/Meta/Method/Delegation.pm, avg 7µs/call
# 14 times (77µs+0s) by Template::Context::process at line 373 of Template/Context.pm, avg 5µs/call
# 14 times (75µs+0s) by Template::Context::process at line 331 of Template/Context.pm, avg 5µs/call
# 14 times (52µs+0s) by Moose::Meta::Method::Delegation::new at line 25 of Moose/Meta/Method/Delegation.pm, avg 4µs/call
# 13 times (71µs+0s) by Tree::Simple::_setParent at line 78 of Tree/Simple.pm, avg 5µs/call
# 13 times (65µs+0s) by Tree::Simple::_insertChildAt at line 162 of Tree/Simple.pm, avg 5µs/call
# 13 times (43µs+0s) by Class::MOP::Class:::around at line 73 of Catalyst/Component.pm, avg 3µs/call
# 12 times (40µs+0s) by Moose::Object::new at line 24 of Moose/Object.pm, avg 3µs/call
# 11 times (60µs+0s) by Moose::Meta::Role::add_role at line 357 of Moose/Meta/Role.pm, avg 5µs/call
# 11 times (59µs+0s) by Moose::Util::MetaRole::apply_metaroles at line 23 of Moose/Util/MetaRole.pm, avg 5µs/call
# 11 times (54µs+0s) by Moose::Util::MetaRole::_fixup_old_style_args at line 59 of Moose/Util/MetaRole.pm, avg 5µs/call
# 11 times (51µs+0s) by Catalyst::setup_component at line 2516 of Catalyst.pm, avg 5µs/call
# 10 times (45µs+0s) by Catalyst::Dispatcher::_command2action at line 149 of Catalyst/Dispatcher.pm, avg 4µs/call
# 10 times (33µs+0s) by Template::Context::process at line 339 of Template/Context.pm, avg 3µs/call
# 10 times (26µs+0s) by Catalyst::Component::BUILDARGS at line 83 of Catalyst/Component.pm, avg 3µs/call
# 9 times (104µs+0s) by Moose::Meta::Role::Composite::add_method at line 82 of Moose/Meta/Role/Composite.pm, avg 12µs/call
# 9 times (47µs+0s) by MooseX::Types::TypeDecorator::new at line 71 of MooseX/Types/TypeDecorator.pm, avg 5µs/call
# 8 times (93µs+0s) by Moose::Meta::Role::Application::RoleSummation::get_exclusions_for_role at line 24 of Moose/Meta/Role/Application/RoleSummation.pm, avg 12µs/call
# 8 times (38µs+0s) by Moose::Meta::Role::combine at line 432 of Moose/Meta/Role.pm, avg 5µs/call
# 7 times (30µs+0s) by Catalyst::setup_plugins at line 2821 of Catalyst.pm, avg 4µs/call
# 7 times (28µs+0s) by Catalyst::Controller::register_action_methods at line 219 of Catalyst/Controller.pm, avg 4µs/call
# 5 times (106µs+0s) by Moose::Meta::TypeConstraint::Parameterized::compile_type_constraint at line 46 of Moose/Meta/TypeConstraint/Parameterized.pm, avg 21µs/call
# 5 times (26µs+0s) by Tree::Simple::accept at line 454 of Tree/Simple.pm, avg 5µs/call
# 5 times (26µs+0s) by Template::Iterator::new at line 55 of Template/Iterator.pm, avg 5µs/call
# 5 times (24µs+0s) by Tree::Simple::Visitor::FindByUID::visit at line 98 of Tree/Simple/Visitor/FindByUID.pm, avg 5µs/call
# 5 times (22µs+0s) by Data::Visitor::retain_magic at line 405 of Data/Visitor.pm, avg 4µs/call
# 5 times (18µs+0s) by Tree::Simple::Visitor::FindByUID::visit at line 44 of Tree/Simple/Visitor/FindByUID.pm, avg 4µs/call
# 4 times (20µs+0s) by Catalyst::Dispatcher::_invoke_as_component at line 323 of Catalyst/Dispatcher.pm, avg 5µs/call
# 4 times (14µs+0s) by Catalyst::Dispatcher::_find_component at line 312 of Catalyst/Dispatcher.pm, avg 3µs/call
# 4 times (11µs+0s) by Catalyst::Dispatcher::_find_component at line 314 of Catalyst/Dispatcher.pm, avg 3µs/call
# 3 times (16µs+0s) by Moose::Meta::Role::reinitialize at line 170 of Moose/Meta/Role.pm, avg 5µs/call
# 3 times (15µs+0s) by MooseX::Emulate::Class::Accessor::Fast::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/MooseX/Emulate/Class/Accessor/Fast.pm:77] at line 74 of MooseX/Emulate/Class/Accessor/Fast.pm, avg 5µs/call
# 2 times (10µs+0s) by Moose::Role::init_meta at line 123 of Moose/Role.pm, avg 5µs/call
# 2 times (6µs+0s) by Class::MOP::Mixin::HasMethods::remove_method at line 140 of Class/MOP/Mixin/HasMethods.pm, avg 3µs/call
# once (11µs+0s) by Catalyst::View::TT::process at line 221 of Catalyst/View/TT.pm
# once (9µs+0s) by Catalyst::finalize_headers at line 1829 of Catalyst.pm
# once (7µs+0s) by Catalyst::Engine::finalize_body at line 50 of Catalyst/Engine.pm
# once (7µs+0s) by Catalyst::setup at line 1122 of Catalyst.pm
# once (6µs+0s) by Tree::Simple::_init at line 60 of Tree/Simple.pm
# once (6µs+0s) by Data::Visitor::Callback::visit_object at line 160 of Data/Visitor/Callback.pm
# once (6µs+0s) by Catalyst::setup at line 1123 of Catalyst.pm
# once (6µs+0s) by Catalyst::Engine::finalize_cookies at line 81 of Catalyst/Engine.pm
# once (5µs+0s) by Moose::Util::MetaRole::_make_new_metaclass at line 95 of Moose/Util/MetaRole.pm
# once (5µs+0s) by Moose::Meta::TypeConstraint::Class::__ANON__[/usr/lib/perl5/vendor_perl/5.10.1/i386-linux-thread-multi/Moose/Meta/TypeConstraint/Class.pm:38] at line 37 of Moose/Meta/TypeConstraint/Class.pm
# once (3µs+0s) by Moose::init_meta at line 208 of Moose.pm | |||||
# spent 186µs within Scalar::Util::looks_like_number which was called 31 times, avg 6µs/call:
# 29 times (174µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 151 of Class/MOP/Method/Constructor.pm, avg 6µs/call
# 2 times (12µs+0s) by Catalyst::Action::compare at line 86 of Catalyst/Action.pm, avg 6µs/call | |||||
# spent 1.03ms within Scalar::Util::refaddr which was called 228 times, avg 5µs/call:
# 70 times (283µs+0s) by Moose::Meta::TypeConstraint::equals at line 136 of Moose/Meta/TypeConstraint.pm, avg 4µs/call
# 48 times (176µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 74 of Class/MOP/Method/Inlined.pm, avg 4µs/call
# 26 times (77µs+0s) by overload::AddrRef at line 98 of overload.pm, avg 3µs/call
# 20 times (69µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 79 of Class/MOP/Method/Inlined.pm, avg 3µs/call
# 16 times (218µs+0s) by Data::Visitor::Callback::callback_and_reg at line 266 of Data/Visitor/Callback.pm, avg 14µs/call
# 10 times (45µs+0s) by Data::Visitor::_register_mapping at line 98 of Data/Visitor.pm, avg 4µs/call
# 10 times (42µs+0s) by Data::Visitor::Callback::visit_hash_entry at line 223 of Data/Visitor/Callback.pm, avg 4µs/call
# 10 times (39µs+0s) by Data::Visitor::Callback::visit_hash at line 9 of (eval 0)[Data/Visitor/Callback.pm:195] at line 195 of Data/Visitor/Callback.pm, avg 4µs/call
# 6 times (30µs+0s) by Data::Visitor::Callback::visit at line 78 of Data/Visitor/Callback.pm, avg 5µs/call
# 6 times (27µs+0s) by Data::Visitor::visit at line 62 of Data/Visitor.pm, avg 5µs/call
# 6 times (26µs+0s) by Data::Visitor::Callback::visit at line 100 of Data/Visitor/Callback.pm, avg 4µs/call | |||||
# spent 8.85ms within Scalar::Util::reftype which was called 1715 times, avg 5µs/call:
# 925 times (4.55ms+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 5µs/call
# 377 times (1.75ms+0s) by Class::MOP::Method::wrap at line 31 of Class/MOP/Method.pm, avg 5µs/call
# 242 times (1.49ms+0s) by Class::MOP::Package::has_package_symbol at line 171 of Class/MOP/Package.pm, avg 6µs/call
# 111 times (793µs+0s) by Class::MOP::Class::_construct_instance at line 369 of Class/MOP/Class.pm, avg 7µs/call
# 26 times (84µs+0s) by overload::AddrRef at line 97 of overload.pm, avg 3µs/call
# 16 times (78µs+0s) by List::MoreUtils::all at line 302 of Moose/Util/TypeConstraints.pm, avg 5µs/call
# 5 times (33µs+0s) by __TYPE__::ArrayRef or __TYPE__::HashRef at line 392 of MooseX/Types.pm, avg 7µs/call
# 5 times (26µs+0s) by Data::Visitor::visit_ref at line 133 of Data/Visitor.pm, avg 5µs/call
# 5 times (26µs+0s) by Data::Visitor::Callback::visit_hash at line 5 of (eval 0)[Data/Visitor/Callback.pm:195] at line 195 of Data/Visitor/Callback.pm, avg 5µs/call
# 2 times (12µs+0s) by List::MoreUtils::any at line 277 of Moose/Util/TypeConstraints.pm, avg 6µs/call
# once (5µs+0s) by Moose::Util::TypeConstraints::subtype at line 296 of Moose/Util/TypeConstraints.pm | |||||
# spent 8µs within Scalar::Util::set_prototype which was called
# once (8µs+0s) by Moose::Exporter::_curry_wrapper at line 273 of Moose/Exporter.pm | |||||
# spent 12.4ms within Scalar::Util::weaken which was called 1895 times, avg 7µs/call:
# 783 times (4.36ms+0s) by Class::MOP::Method::attach_to_class at line 75 of Class/MOP/Method.pm, avg 6µs/call
# 305 times (3.22ms+0s) by Class::MOP::Method::Accessor::new at line 37 of Class/MOP/Method/Accessor.pm, avg 11µs/call
# 234 times (1.43ms+0s) by Class::MOP::Attribute::attach_to_class at line 232 of Class/MOP/Attribute.pm, avg 6µs/call
# 214 times (1.39ms+0s) by Class::MOP::Method::wrap at line 46 of Class/MOP/Method.pm, avg 6µs/call
# 158 times (810µs+0s) by Class::MOP::Instance::new at line 42 of Class/MOP/Instance.pm, avg 5µs/call
# 31 times (186µs+0s) by Class::MOP::Method::Constructor::new at line 32 of Class/MOP/Method/Constructor.pm, avg 6µs/call
# 26 times (208µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 28 of Moose/Meta/Role/Application/ToClass.pm, avg 8µs/call
# 26 times (133µs+0s) by Moose::Meta::Method::Destructor::new at line 41 of Moose/Meta/Method/Destructor.pm, avg 5µs/call
# 26 times (126µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 29 of Moose/Meta/Role/Application/ToClass.pm, avg 5µs/call
# 25 times (188µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 59 of Moose/Meta/Role/Attribute.pm, avg 8µs/call
# 25 times (147µs+0s) by Moose::Meta::Method::Constructor::new at line 39 of Moose/Meta/Method/Constructor.pm, avg 6µs/call
# 14 times (61µs+0s) by Moose::Meta::Method::Delegation::new at line 48 of Moose/Meta/Method/Delegation.pm, avg 4µs/call
# 13 times (60µs+0s) by Tree::Simple::_setParent at line 86 of Tree/Simple.pm, avg 5µs/call
# 8 times (50µs+0s) by Class::MOP::weaken_metaclass at line 53 of Class/MOP.pm, avg 6µs/call
# 4 times (27µs+0s) by Catalyst::View::TT::new at line 143 of Catalyst/View/TT.pm, avg 7µs/call
# once (11µs+0s) by Catalyst::Plugin::Session::Store::DBI::BEGIN@6 at line 287 of DBI.pm
# once (6µs+0s) by Catalyst::Request::_context at line 47 of accessor _context defined at Catalyst/Request.pm
# once (5µs+0s) by Catalyst::Response::_context at line 35 of accessor _context defined at Catalyst/Response.pm |