← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:22 2010

File /usr/local/lib/perl5/5.10.1/darwin-2level/Scalar/Util.pm
Statements Executed 14
Statement Execution Time 474µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
876358405.13ms5.13msScalar::Util::::blessedScalar::Util::blessed (xsub)
153715121.46ms1.46msScalar::Util::::weakenScalar::Util::weaken (xsub)
12611110661µs661µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
111348µs719µsScalar::Util::::BEGIN@10Scalar::Util::BEGIN@10
31596166µs166µsScalar::Util::::refaddrScalar::Util::refaddr (xsub)
291228µs28µsScalar::Util::::looks_like_numberScalar::Util::looks_like_number (xsub)
11112µs15µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
21211µs11µsScalar::Util::::set_prototypeScalar::Util::set_prototype (xsub)
0000s0sScalar::Util::::export_failScalar::Util::export_fail
0000s0sScalar::Util::::openhandleScalar::Util::openhandle
Call graph for these subroutines as a Graphviz dot language file.
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
7package Scalar::Util;
8
9329µs218µs
# spent 15µs (12+3) within Scalar::Util::BEGIN@9 which was called # once (12µs+3µs) by Test::Deep::Cache::Simple::BEGIN@7 at line 9
use strict;
# spent 15µs making 1 call to Scalar::Util::BEGIN@9 # spent 3µs making 1 call to strict::import
103350µs2774µs
# spent 719µs (348+371) within Scalar::Util::BEGIN@10 which was called # once (348µs+371µs) by Test::Deep::Cache::Simple::BEGIN@7 at line 10
use vars qw(@ISA @EXPORT_OK $VERSION @EXPORT_FAIL);
# spent 719µs making 1 call to Scalar::Util::BEGIN@10 # spent 55µs making 1 call to vars::import
111500nsrequire Exporter;
12160µsrequire List::Util; # List::Util loads the XS
13
1416µs@ISA = qw(Exporter);
1512µs@EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype);
161300ns$VERSION = "1.23";
17113µs$VERSION = eval $VERSION;
18
191200nsunless (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
26sub 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
48sub 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
66113µs1;
67
68__END__
69
70=head1 NAME
71
72Scalar::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
82C<Scalar::Util> contains a selection of subroutines that people have
83expressed would be nice to have in the perl core, but the usage would
84not really be high enough to warrant the use of a keyword, and the size
85so small such that being individual extensions would be wasteful.
86
87By default C<Scalar::Util> does not export any subroutines. The
88subroutines defined are
89
90=over 4
91
92=item blessed EXPR
93
94If EXPR evaluates to a blessed reference the name of the package
95that 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
108Returns a scalar that has the value NUM in a numeric context and the
109value 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
117If 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
125If 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
132B<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
139Returns true if perl thinks EXPR is a number. See
140L<perlapi/looks_like_number>.
141
142=item openhandle FH
143
144Returns FH if FH may be used as a filehandle and is open, or FH is a tied
145handle. 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
154Returns 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
163If EXPR evaluates to a reference the internal memory address of
164the 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
175If EXPR evaluates to a reference the type of the variable referenced
176is 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
187Sets the prototype of the given function, or deletes it if PROTOTYPE is
188undef. Returns the CODEREF.
189
190 set_prototype \&foo, '$$';
191
192=item tainted EXPR
193
194Return 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
201REF will be turned into a weak reference. This means that it will not
202hold a reference count on the object it references. Also when the reference
203count on that object reaches zero, REF will be set to undef.
204
205This is useful for keeping copies of references , but you don't want to
206prevent 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
215Note that if you take a copy of a scalar with a weakened reference,
216the 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
223This may be less obvious in other situations, such as C<grep()>, for instance
224when grepping through a list of weakened references to objects that may have
225been destroyed already:
226
227 @object = grep { defined } @object;
228
229This will indeed remove all references to destroyed objects, but the remaining
230references to objects will be strong, causing the remaining objects to never
231be destroyed because there is now always a strong reference to them in the
232@object array.
233
234=back
235
236=head1 DIAGNOSTICS
237
238Module 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
244The version of perl that you are using does not implement weak references, to use
245C<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
249The version of perl that you are using does not implement Vstrings, to use
250C<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
254C<Scalar::Util> contains both perl and C implementations of many of its functions
255so that those without access to a C compiler may still use it. However some of the functions
256are only available when a C compiler was available to compile the XS version of the extension.
257
258At present that list is: weaken, isweak, dualvar, isvstring, set_prototype
259
260=back
261
262=head1 KNOWN BUGS
263
264There is a bug in perl5.6.0 with UV's that are >= 1<<31. This will
265show up as tests 8 and 9 of dualvar.t failing
266
267=head1 SEE ALSO
268
269L<List::Util>
270
271=head1 COPYRIGHT
272
273Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved.
274This program is free software; you can redistribute it and/or modify it
275under the same terms as Perl itself.
276
277Except weaken and isweak which are
278
279Copyright (c) 1999 Tuomas J. Lukka <lukka@iki.fi>. All rights reserved.
280This program is free software; you can redistribute it and/or modify it
281under the same terms as perl itself.
282
283=cut
# spent 5.13ms within Scalar::Util::blessed which was called 8763 times, avg 585ns/call: # 1999 times (1.41ms+0s) by Class::MOP::Mixin::HasMethods::get_method at line 113 of Class/MOP/Mixin/HasMethods.pm, avg 705ns/call # 1999 times (730µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 115 of Class/MOP/Mixin/HasMethods.pm, avg 365ns/call # 727 times (482µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 43 of Class/MOP/Mixin/HasMethods.pm, avg 663ns/call # 510 times (266µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 255 of Moose/Util/TypeConstraints.pm, avg 522ns/call # 388 times (201µs+0s) by Class::MOP::Object::meta at line 17 of Class/MOP/Object.pm, avg 517ns/call # 312 times (168µs+0s) by Class::MOP::class_of at line 60 of Class/MOP.pm, avg 538ns/call # 309 times (193µs+0s) by Class::MOP::Method::wrap at line 31 of Class/MOP/Method.pm, avg 623ns/call # 276 times (208µs+0s) by Class::MOP::Method::Accessor::new at line 26 of Class/MOP/Method/Accessor.pm, avg 754ns/call # 245 times (156µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 21 of Class/MOP/Mixin/HasAttributes.pm, avg 637ns/call # 202 times (113µs+0s) by Class::MOP::Attribute::attach_to_class at line 230 of Class/MOP/Attribute.pm, avg 562ns/call # 179 times (99µs+0s) by MooseX::Types::TypeDecorator::__type_constraint at line 96 of MooseX/Types/TypeDecorator.pm, avg 551ns/call # 154 times (81µs+0s) by Class::MOP::Class::clone_object at line 404 of Class/MOP/Class.pm, avg 525ns/call # 154 times (75µs+0s) by Class::MOP::Class::_clone_instance at line 417 of Class/MOP/Class.pm, avg 488ns/call # 124 times (90µs+0s) by Class::MOP::Instance::BUILDARGS at line 18 of Class/MOP/Instance.pm, avg 727ns/call # 119 times (87µs+0s) by Moose::Meta::TypeConstraint::Class::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level/Moose/Meta/TypeConstraint/Class.pm:38] at line 37 of Moose/Meta/TypeConstraint/Class.pm, avg 731ns/call # 100 times (55µs+0s) by Class::MOP::Method::Wrapped::wrap at line 74 of Class/MOP/Method/Wrapped.pm, avg 546ns/call # 86 times (83µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 47 of Moose/Meta/TypeConstraint/Registry.pm, avg 964ns/call # 86 times (64µs+0s) by Moose::Meta::Class::add_attribute at line 296 of Moose/Meta/Class.pm, avg 738ns/call # 74 times (47µs+0s) by MooseX::Types::TypeDecorator::new at line 70 of MooseX/Types/TypeDecorator.pm, avg 636ns/call # 62 times (40µs+0s) by Moose::Meta::Attribute::_process_options at line 303 of Moose/Meta/Attribute.pm, avg 640ns/call # 62 times (27µs+0s) by MooseX::Types::TypeDecorator::__ANON__[/usr/local/lib/perl5/site_perl/5.10.1/MooseX/Types/TypeDecorator.pm:20] at line 15 of MooseX/Types/TypeDecorator.pm, avg 431ns/call # 44 times (25µs+0s) by Moose::Meta::Role::add_attribute at line 196 of Moose/Meta/Role.pm, avg 566ns/call # 44 times (20µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 55 of Moose/Meta/Role/Attribute.pm, avg 466ns/call # 43 times (50µs+0s) by Exception::Class::caught at line 185 of Exception/Class.pm, avg 1µs/call # 43 times (25µ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 574ns/call # 40 times (21µs+0s) by Class::MOP::Mixin::meta at line 14 of Class/MOP/Mixin.pm, avg 525ns/call # 39 times (54µs+0s) by SimpleDB::Class::Cache::new or SimpleDB::Class::Domain::new or SimpleDB::Class::ResultSet::new or SimpleDB::Class::SQL::new or SimpleDB::Class::new or SimpleDB::Client::new at line 2 of generated method (unknown origin), avg 1µs/call # 37 times (48µs+0s) by Moose::Object::new at line 24 of Moose/Object.pm, avg 1µs/call # 31 times (21µs+0s) by Class::MOP::Method::Constructor::new at line 20 of Class/MOP/Method/Constructor.pm, avg 668ns/call # 28 times (17µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 523 of Moose/Util/TypeConstraints.pm, avg 604ns/call # 26 times (22µs+0s) by Moose::Util::_apply_all_roles at line 128 of Moose/Util.pm, avg 835ns/call # 26 times (17µs+0s) by Moose::Util::_apply_all_roles at line 104 of Moose/Util.pm, avg 654ns/call # 26 times (15µs+0s) by Moose::Meta::Role::apply at line 404 of Moose/Meta/Role.pm, avg 588ns/call # 23 times (10µs+0s) by MooseX::Types::TypeDecorator::isa at line 114 of MooseX/Types/TypeDecorator.pm, avg 443ns/call # 20 times (19µs+0s) by Devel::StackTrace::_ref_to_string at line 68 of Devel/StackTrace.pm, avg 950ns/call # 20 times (12µs+0s) by overload::AddrRef at line 95 of overload.pm, avg 590ns/call # 13 times (11µs+0s) by Moose::Meta::Role::add_role at line 357 of Moose/Meta/Role.pm, avg 808ns/call # 13 times (9µs+0s) by Moose::Meta::Class::add_role at line 188 of Moose/Meta/Class.pm, avg 715ns/call # 13 times (7µs+0s) by Moose::Meta::Class::add_role_application at line 201 of Moose/Meta/Class.pm, avg 531ns/call # 11 times (9µs+0s) by Moose::Meta::Attribute::_weaken_value at line 489 of Moose/Meta/Attribute.pm, avg 836ns/call # 10 times (5µs+0s) by Moose::Util::TypeConstraints::subtype at line 320 of Moose/Util/TypeConstraints.pm, avg 520ns/call # 7 times (8µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 58 of Moose/Meta/Method/Destructor.pm, avg 1µs/call # 7 times (6µs+0s) by Moose::Meta::TypeConstraint::Parameterized::compile_type_constraint at line 46 of Moose/Meta/TypeConstraint/Parameterized.pm, avg 900ns/call # 4 times (3µs+0s) by DateTime::Helpers::can at line 14 of DateTime/Helpers.pm, avg 700ns/call # 4 times (3µs+0s) by Moose::Meta::Role::add_required_methods at line 215 of Moose/Meta/Role.pm, avg 650ns/call # 3 times (2µs+0s) by Test::Deep::class_base at line 378 of Test/Deep.pm, avg 767ns/call # 3 times (2µs+0s) by Test::Deep::Ref::test_class at line 17 of Test/Deep/Ref.pm, avg 567ns/call # 3 times (1µs+0s) by Test::Deep::Blessed::descend at line 25 of Test/Deep/Blessed.pm, avg 400ns/call # 2 times (2µs+0s) by Moose::Meta::Class::reinitialize at line 145 of Moose/Meta/Class.pm, avg 1µs/call # 2 times (2µs+0s) by Class::MOP::Package::reinitialize at line 50 of Class/MOP/Package.pm, avg 1µs/call # 2 times (2µs+0s) by overload::Method at line 79 of overload.pm, avg 1µs/call # 2 times (2µs+0s) by MooseX::AttributeHelpers::Trait::Base::process_options_for_provides at line 65 of MooseX/AttributeHelpers/Trait/Base.pm, avg 800ns/call # 2 times (1µs+0s) by Class::MOP::Package::reinitialize at line 54 of Class/MOP/Package.pm, avg 500ns/call # once (2µs+0s) by Moose::Meta::TypeCoercion::Union::compile_type_coercion at line 20 of Moose/Meta/TypeCoercion/Union.pm # once (1µs+0s) by Moose::init_meta at line 208 of Moose.pm # once (800ns+0s) by MooseX::ClassAttribute::Role::Meta::Class::add_class_attribute at line 45 of MooseX/ClassAttribute/Role/Meta/Class.pm # once (700ns+0s) by Moose::Util::MetaRole::_fixup_old_style_args at line 59 of Moose/Util/MetaRole.pm # once (600ns+0s) by Moose::Util::MetaRole::apply_metaroles at line 23 of Moose/Util/MetaRole.pm
sub Scalar::Util::blessed; # xsub
# spent 28µs within Scalar::Util::looks_like_number which was called 29 times, avg 966ns/call: # 29 times (28µs+0s) by Class::MOP::Method::Constructor::_generate_slot_initializer at line 151 of Class/MOP/Method/Constructor.pm, avg 966ns/call
sub Scalar::Util::looks_like_number; # xsub
# spent 166µs within Scalar::Util::refaddr which was called 315 times, avg 528ns/call: # 114 times (53µs+0s) by Test::Deep::Cache::Simple::fn_get_key at line 79 of Test/Deep/Cache/Simple.pm, avg 461ns/call # 108 times (44µs+0s) by Moose::Meta::TypeConstraint::equals at line 136 of Moose/Meta/TypeConstraint.pm, avg 407ns/call # 20 times (14µs+0s) by overload::AddrRef at line 98 of overload.pm, avg 715ns/call # 19 times (14µs+0s) by Test::Deep::descend at line 280 of Test/Deep.pm, avg 753ns/call # 19 times (11µs+0s) by Test::Deep::descend at line 305 of Test/Deep.pm, avg 563ns/call # 19 times (8µs+0s) by Test::Deep::descend at line 281 of Test/Deep.pm, avg 416ns/call # 12 times (11µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 74 of Class/MOP/Method/Inlined.pm, avg 950ns/call # 3 times (2µs+0s) by Test::Deep::wrap at line 342 of Test/Deep.pm, avg 633ns/call # once (9µs+0s) by main::BEGIN@2 at line 48 of Test/Deep.pm
sub Scalar::Util::refaddr; # xsub
# spent 661µs within Scalar::Util::reftype which was called 1261 times, avg 524ns/call: # 888 times (429µs+0s) by Sub::Install::_CODELIKE at line 98 of Sub/Install.pm, avg 483ns/call # 309 times (179µs+0s) by Class::MOP::Method::wrap at line 31 of Class/MOP/Method.pm, avg 579ns/call # 20 times (18µs+0s) by overload::AddrRef at line 97 of overload.pm, avg 910ns/call # 20 times (14µs+0s) by List::MoreUtils::all at line 302 of Moose/Util/TypeConstraints.pm, avg 685ns/call # 8 times (6µs+0s) by Moose::Util::TypeConstraints::subtype at line 296 of Moose/Util/TypeConstraints.pm, avg 700ns/call # 4 times (3µs+0s) by __TYPE__::ArrayRef at line 392 of MooseX/Types.pm, avg 725ns/call # 3 times (5µs+0s) by Class::MOP::Class::_construct_instance at line 369 of Class/MOP/Class.pm, avg 2µs/call # 3 times (3µs+0s) by Test::Deep::class_base at line 380 of Test/Deep.pm, avg 1µs/call # 3 times (2µs+0s) by Test::Deep::RefType::descend at line 24 of Test/Deep/RefType.pm, avg 667ns/call # 2 times (2µs+0s) by List::MoreUtils::any at line 277 of Moose/Util/TypeConstraints.pm, avg 750ns/call # once (2µs+0s) by Class::MOP::Package::has_package_symbol at line 171 of Class/MOP/Package.pm
sub Scalar::Util::reftype; # xsub
# spent 11µs within Scalar::Util::set_prototype which was called 2 times, avg 5µs/call: # 2 times (11µs+0s) by Moose::Exporter::_curry_wrapper at line 273 of Moose/Exporter.pm, avg 5µs/call
sub Scalar::Util::set_prototype; # xsub
# spent 1.46ms within Scalar::Util::weaken which was called 1537 times, avg 948ns/call: # 630 times (493µs+0s) by Class::MOP::Method::attach_to_class at line 75 of Class/MOP/Method.pm, avg 783ns/call # 276 times (344µs+0s) by Class::MOP::Method::Accessor::new at line 37 of Class/MOP/Method/Accessor.pm, avg 1µs/call # 202 times (199µs+0s) by Class::MOP::Attribute::attach_to_class at line 232 of Class/MOP/Attribute.pm, avg 984ns/call # 141 times (127µs+0s) by Class::MOP::Method::wrap at line 46 of Class/MOP/Method.pm, avg 901ns/call # 124 times (119µs+0s) by Class::MOP::Instance::new at line 42 of Class/MOP/Instance.pm, avg 958ns/call # 44 times (29µs+0s) by Moose::Meta::Role::Attribute::attach_to_role at line 59 of Moose/Meta/Role/Attribute.pm, avg 668ns/call # 31 times (34µs+0s) by Class::MOP::Method::Constructor::new at line 32 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 19 times (25µs+0s) by Test::Deep::Cache::Simple::add at line 43 of Test/Deep/Cache/Simple.pm, avg 1µs/call # 19 times (19µs+0s) by Test::Deep::Cache::Simple::add at line 42 of Test/Deep/Cache/Simple.pm, avg 989ns/call # 13 times (20µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 28 of Moose/Meta/Role/Application/ToClass.pm, avg 2µs/call # 13 times (15µs+0s) by Moose::Meta::Role::Application::ToClass::apply at line 29 of Moose/Meta/Role/Application/ToClass.pm, avg 1µs/call # 11 times (17µs+0s) by Class::MOP::Instance::weaken_slot_value at line 145 of Class/MOP/Instance.pm, avg 2µs/call # 6 times (6µs+0s) by Moose::Meta::Method::Constructor::new at line 39 of Moose/Meta/Method/Constructor.pm, avg 1µs/call # 6 times (5µs+0s) by Moose::Meta::Method::Destructor::new at line 41 of Moose/Meta/Method/Destructor.pm, avg 883ns/call # 2 times (4µs+0s) by Class::MOP::weaken_metaclass at line 53 of Class/MOP.pm, avg 2µs/call
sub Scalar::Util::weaken; # xsub