← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:40 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/darwin-thread-multi-2level/Scalar/Util.pm
StatementsExecuted 13 statements in 450µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
200200239321.17s1.17sScalar::Util::::blessedScalar::Util::blessed (xsub)
101716131.16ms1.16msScalar::Util::::weakenScalar::Util::weaken (xsub)
58454379µs379µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
631144µs44µsScalar::Util::::isweakScalar::Util::isweak (xsub)
11115µs32µsScalar::Util::::BEGIN@11Scalar::Util::BEGIN@11
2115µs5µsScalar::Util::::refaddrScalar::Util::refaddr (xsub)
0000s0sScalar::Util::::export_failScalar::Util::export_fail
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#
7# Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk>
8
9package Scalar::Util;
10
112316µs248µs
# spent 32µs (15+16) within Scalar::Util::BEGIN@11 which was called: # once (15µs+16µs) by Mouse::Util::BEGIN@136 at line 11
use strict;
# spent 32µs making 1 call to Scalar::Util::BEGIN@11 # spent 16µs making 1 call to strict::import
121500nsrequire Exporter;
13195µsrequire List::Util; # List::Util loads the XS
14
1517µsour @ISA = qw(Exporter);
1613µsour @EXPORT_OK = qw(
17 blessed
18 dualvar
19 isdual
20 isvstring
21 isweak
22 looks_like_number
23 openhandle
24 readonly
25 refaddr
26 reftype
27 set_prototype
28 tainted
29 weaken
30);
311400nsour $VERSION = "1.35";
32117µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
33
341100nsour @EXPORT_FAIL;
35
361400nsunless (defined &weaken) {
37 push @EXPORT_FAIL, qw(weaken);
38}
391100nsunless (defined &isweak) {
40 push @EXPORT_FAIL, qw(isweak isvstring);
41}
421100nsunless (defined &isvstring) {
43 push @EXPORT_FAIL, qw(isvstring);
44}
45
46sub export_fail {
47 if (grep { /^(?:weaken|isweak)$/ } @_ ) {
48 require Carp;
49 Carp::croak("Weak references are not implemented in the version of perl");
50 }
51
52 if (grep { /^isvstring$/ } @_ ) {
53 require Carp;
54 Carp::croak("Vstrings are not implemented in the version of perl");
55 }
56
57 @_;
58}
59
60110µs1;
61
62__END__
 
# spent 1.17s within Scalar::Util::blessed which was called 2002002 times, avg 582ns/call: # 1000158 times (403ms+0s) by Type::Library::meta at line 209 of Type/Library.pm, avg 403ns/call # 1000000 times (761ms+0s) by Typed::__ANON__[/opt/perl-5.18.1/lib/site_perl/5.18.1/Typed.pm:134] at line 117 of Typed.pm, avg 761ns/call # 386 times (361µs+0s) by Class::MOP::Mixin::HasMethods::add_method at line 62 of Class/MOP/Mixin/HasMethods.pm, avg 936ns/call # 195 times (163µs+0s) by Class::MOP::Mixin::meta or Class::MOP::Object::meta or Foo::Moose::meta or 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 48 of Class/MOP/Method/Meta.pm, avg 836ns/call # 191 times (204µs+0s) by Class::MOP::Method::Accessor::new at line 29 of Class/MOP/Method/Accessor.pm, avg 1µs/call # 191 times (114µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 599ns/call # 154 times (142µs+0s) by Class::MOP::Mixin::HasMethods::get_method at line 122 of Class/MOP/Mixin/HasMethods.pm, avg 923ns/call # 124 times (96µs+0s) by Class::MOP::Attribute::attach_to_class at line 240 of Class/MOP/Attribute.pm, avg 772ns/call # 124 times (91µs+0s) by Class::MOP::Mixin::HasAttributes::add_attribute at line 20 of Class/MOP/Mixin/HasAttributes.pm, avg 732ns/call # 48 times (32µs+0s) by Class::MOP::Instance::BUILDARGS at line 23 of Class/MOP/Instance.pm, avg 658ns/call # 44 times (30µs+0s) by Class::MOP::Method::Wrapped::wrap at line 76 of Class/MOP/Method/Wrapped.pm, avg 684ns/call # 35 times (22µs+0s) by Type::Library::add_type at line 216 of Type/Library.pm, avg 643ns/call # 35 times (14µs+0s) by Type::Library::add_type at line 221 of Type/Library.pm, avg 409ns/call # 34 times (45µs+0s) by Type::Tiny::new at line 90 of Type/Tiny.pm, avg 1µs/call # 33 times (21µs+0s) by Class::MOP::Object::meta at line 20 of Class/MOP/Object.pm, avg 639ns/call # 32 times (40µs+0s) by Class::MOP::Class::_construct_instance at line 510 of Class/MOP/Class.pm, avg 1µs/call # 30 times (31µs+0s) by Class::MOP::Method::Constructor::new at line 23 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 30 times (14µs+0s) by Moose::Util::TypeConstraints::find_type_constraint at line 312 of Moose/Util/TypeConstraints.pm, avg 453ns/call # 28 times (26µs+0s) by Class::MOP::Method::clone at line 135 of Class/MOP/Method.pm, avg 932ns/call # 25 times (32µs+0s) by Moose::Meta::TypeConstraint::Registry::add_type_constraint at line 51 of Moose/Meta/TypeConstraint/Registry.pm, avg 1µs/call # 19 times (10µs+0s) by Class::MOP::class_of at line 65 of Class/MOP.pm, avg 532ns/call # 18 times (12µs+0s) by Class::MOP::Mixin::meta at line 16 of Class/MOP/Mixin.pm, avg 650ns/call # 17 times (8µs+0s) by Moose::Meta::TypeConstraint::_new at line 6 of (eval 88)[Eval/Closure.pm:144], avg 500ns/call # 16 times (12µs+0s) by Moose::Util::TypeConstraints::_create_type_constraint at line 565 of Moose/Util/TypeConstraints.pm, avg 781ns/call # 5 times (2µs+0s) by Moose::Meta::Method::_new at line 6 of (eval 171)[Eval/Closure.pm:144], avg 480ns/call # 4 times (2µs+0s) by Method::Generate::Accessor::_generate_call_code at line 427 of Method/Generate/Accessor.pm, avg 600ns/call # 4 times (2µs+0s) by Moose::Meta::TypeConstraint::Class::_new at line 6 of (eval 102)[Eval/Closure.pm:144], avg 575ns/call # 4 times (2µs+0s) by Moose::Meta::TypeConstraint::Parameterizable::_new at line 6 of (eval 100)[Eval/Closure.pm:144], avg 525ns/call # 3 times (3µs+0s) by Eval::TypeTiny::Sandbox::__ANON__[(eval 419)[/opt/perl-5.18.1/lib/site_perl/5.18.1/Eval/TypeTiny.pm:21]:3] at line 3 of (eval 419)[Eval/TypeTiny.pm:21], avg 1µs/call # 3 times (2µs+0s) by Type::Library::add_coercion at line 283 of Type/Library.pm, avg 733ns/call # 3 times (2µs+0s) by Type::Library::add_coercion at line 271 of Type/Library.pm, avg 533ns/call # 2 times (1µs+0s) by Moose::Meta::Attribute::_process_isa_option at line 361 of Moose/Meta/Attribute.pm, avg 650ns/call # once (1µs+0s) by Moose::Meta::Method::Destructor::is_needed at line 61 of Moose/Meta/Method/Destructor.pm # once (800ns+0s) by Mouse::Meta::Class::add_attribute at line 207 of Mouse/Meta/Class.pm # once (700ns+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm # once (700ns+0s) by Moose::Meta::Attribute::_new at line 6 of (eval 157)[Eval/Closure.pm:144] # once (600ns+0s) by Moose::Meta::Class::add_attribute at line 576 of Moose/Meta/Class.pm # once (500ns+0s) by Moose::Meta::Instance::_new at line 6 of (eval 165)[Eval/Closure.pm:144] # once (500ns+0s) by Foo::Moose::new at line 11 of (eval 442)[Eval/Closure.pm:144]
sub Scalar::Util::blessed; # xsub
# spent 44µs within Scalar::Util::isweak which was called 63 times, avg 702ns/call: # 63 times (44µs+0s) by Class::MOP::metaclass_is_weak at line 58 of Class/MOP.pm, avg 702ns/call
sub Scalar::Util::isweak; # xsub
# spent 5µs within Scalar::Util::refaddr which was called 2 times, avg 2µs/call: # 2 times (5µs+0s) by Class::MOP::Method::Inlined::can_be_inlined at line 74 of Class/MOP/Method/Inlined.pm, avg 2µs/call
sub Scalar::Util::refaddr; # xsub
# spent 379µs within Scalar::Util::reftype which was called 584 times, avg 649ns/call: # 191 times (110µs+0s) by Class::MOP::Method::wrap at line 33 of Class/MOP/Method.pm, avg 573ns/call # 158 times (86µs+0s) by Eval::Closure::_validate_env at line 80 of Eval/Closure.pm, avg 547ns/call # 129 times (108µs+0s) by Eval::Closure::_canonicalize_source at line 56 of Eval/Closure.pm, avg 836ns/call # 65 times (39µs+0s) by Class::MOP::Mixin::HasMethods::wrap_method_body at line 45 of Class/MOP/Mixin/HasMethods.pm, avg 606ns/call # 41 times (36µs+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm, avg 871ns/call
sub Scalar::Util::reftype; # xsub
# spent 1.16ms within Scalar::Util::weaken which was called 1017 times, avg 1µs/call: # 363 times (339µs+0s) by Class::MOP::Method::attach_to_class at line 77 of Class/MOP/Method.pm, avg 935ns/call # 191 times (235µs+0s) by Class::MOP::Method::Accessor::new at line 40 of Class/MOP/Method/Accessor.pm, avg 1µs/call # 147 times (228µs+0s) by Class::MOP::Method::wrap at line 48 of Class/MOP/Method.pm, avg 2µs/call # 124 times (132µs+0s) by Class::MOP::Attribute::attach_to_class at line 242 of Class/MOP/Attribute.pm, avg 1µs/call # 48 times (62µs+0s) by Class::MOP::Instance::new at line 47 of Class/MOP/Instance.pm, avg 1µs/call # 37 times (55µs+0s) by Type::Tiny::new at line 138 of Type/Tiny.pm, avg 1µs/call # 30 times (37µs+0s) by Class::MOP::Method::Constructor::new at line 35 of Class/MOP/Method/Constructor.pm, avg 1µs/call # 28 times (22µs+0s) by Class::MOP::Method::clone at line 136 of Class/MOP/Method.pm, avg 786ns/call # 25 times (22µs+0s) by Class::MOP::Method::Meta::_generate_meta_method at line 29 of Class/MOP/Method/Meta.pm, avg 864ns/call # 9 times (10µs+0s) by Sub::Defer::defer_sub at line 51 of Sub/Defer.pm, avg 1µs/call # 6 times (4µs+0s) by Sub::Quote::quote_sub at line 71 of Sub/Quote.pm, avg 750ns/call # 3 times (4µs+0s) by Sub::Defer::undefer_sub at line 32 of Sub/Defer.pm, avg 1µs/call # 3 times (4µs+0s) by Type::Coercion::new at line 60 of Type/Coercion.pm, avg 1µs/call # once (2µs+0s) by Moose::Meta::Method::Constructor::new at line 46 of Moose/Meta/Method/Constructor.pm # once (2µs+0s) by Mouse::Meta::Class::add_attribute at line 238 of Mouse/Meta/Class.pm # once (800ns+0s) by Moose::Meta::Method::Destructor::new at line 44 of Moose/Meta/Method/Destructor.pm
sub Scalar::Util::weaken; # xsub