← Index
NYTProf Performance Profile   « line view »
For /Users/timbo/perl5/perlbrew/perls/perl-5.18.2/bin/perlcritic
  Run on Sat Mar 19 22:12:22 2016
Reported on Sat Mar 19 22:14:10 2016

Filename/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/darwin-2level/Scalar/Util.pm
StatementsExecuted 14 statements in 271µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
410589215237ms237msScalar::Util::::refaddrScalar::Util::refaddr (xsub)
1106968494.8ms94.8msScalar::Util::::weakenScalar::Util::weaken (xsub)
7724995.43ms5.43msScalar::Util::::blessedScalar::Util::blessed (xsub)
11113µs25µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
61112µs12µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
0000s0sScalar::Util::::export_failScalar::Util::export_fail
0000s0sScalar::Util::::set_prototypeScalar::Util::set_prototype
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved.
2# This program is free software; you can redistribute it and/or
3# modify it under the same terms as Perl itself.
4#
5# Maintained since 2013 by Paul Evans <leonerd@leonerd.org.uk>
6
7package Scalar::Util;
8
92224µs236µs
# spent 25µs (13+12) within Scalar::Util::BEGIN@9 which was called: # once (13µs+12µs) by Perl::Critic::Utils::BEGIN@21 at line 9
use strict;
# spent 25µs making 1 call to Scalar::Util::BEGIN@9 # spent 12µs making 1 call to strict::import
101300nsrequire Exporter;
11
1215µsour @ISA = qw(Exporter);
1312µsour @EXPORT_OK = qw(
14 blessed refaddr reftype weaken unweaken isweak
15
16 dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
17 tainted
18);
191200nsour $VERSION = "1.42";
20113µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
21
221200nsrequire List::Util; # List::Util loads the XS
23118µs110µsList::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863)
# spent 10µs making 1 call to UNIVERSAL::VERSION
24
251100nsour @EXPORT_FAIL;
26
271400nsunless (defined &weaken) {
28 push @EXPORT_FAIL, qw(weaken);
29}
301200nsunless (defined &isweak) {
31 push @EXPORT_FAIL, qw(isweak isvstring);
32}
331100nsunless (defined &isvstring) {
34 push @EXPORT_FAIL, qw(isvstring);
35}
36
37sub export_fail {
38 if (grep { /^(?:weaken|isweak)$/ } @_ ) {
39 require Carp;
40 Carp::croak("Weak references are not implemented in the version of perl");
41 }
42
43 if (grep { /^isvstring$/ } @_ ) {
44 require Carp;
45 Carp::croak("Vstrings are not implemented in the version of perl");
46 }
47
48 @_;
49}
50
51# set_prototype has been moved to Sub::Util with a different interface
52sub set_prototype(&$)
53{
54 my ( $code, $proto ) = @_;
55 return Sub::Util::set_prototype( $proto, $code );
56}
57
5817µs1;
59
60__END__
 
# spent 5.43ms within Scalar::Util::blessed which was called 7724 times, avg 703ns/call: # 6775 times (4.59ms+0s) by Devel::StackTrace::_ref_to_string at line 81 of Devel/StackTrace.pm, avg 677ns/call # 236 times (108µs+0s) by Path::IsDev::Role::Heuristic::name at line 12 of Path/IsDev/Role/Heuristic.pm, avg 459ns/call # 154 times (162µs+0s) by Perl::Critic::Utils::_name_for_sub_or_stringified_element at line 352 of Perl/Critic/Utils.pm, avg 1µs/call # 144 times (212µs+0s) by Perl::Critic::critique at line 104 of Perl/Critic.pm, avg 1µs/call # 144 times (119µs+0s) by Perl::Critic::Document::_is_ppi_doc at line 135 of Perl/Critic/Document.pm, avg 828ns/call # 142 times (162µs+0s) by Perl::Critic::Policy::TestingAndDebugging::RequireUseStrict::__ANON__[/Users/timbo/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Perl/Critic/Policy/TestingAndDebugging/RequireUseStrict.pm:116] at line 105 of Perl/Critic/Policy/TestingAndDebugging/RequireUseStrict.pm, avg 1µs/call # 104 times (48µs+0s) by Path::IsDev::Role::NegativeHeuristic::name at line 12 of Path/IsDev/Role/NegativeHeuristic.pm, avg 460ns/call # 22 times (32µs+0s) by Perl::Critic::Config::add_policy at line 175 of Perl/Critic/Config.pm, avg 1µs/call # 3 times (4µs+0s) by Perl::Critic::Violation::new at line 83 of Perl/Critic/Violation.pm, avg 2µs/call
sub Scalar::Util::blessed; # xsub
# spent 237ms within Scalar::Util::refaddr which was called 410589 times, avg 576ns/call: # 95278 times (47.5ms+0s) by List::MoreUtils::firstidx at line 368 of PPI/Element.pm, avg 498ns/call # 94372 times (51.4ms+0s) by PPI::Element::DESTROY at line 1083 of PPI/Element.pm, avg 544ns/call # 50565 times (32.4ms+0s) by PPI::Lexer::_add_element at line 1462 of PPI/Lexer.pm, avg 641ns/call # 30261 times (17.5ms+0s) by PPI::Element::snext_sibling at line 364 of PPI/Element.pm, avg 578ns/call # 30261 times (17.3ms+0s) by PPI::Element::snext_sibling at line 365 of PPI/Element.pm, avg 570ns/call # 23725 times (12.8ms+0s) by PPI::Element::parent at line 147 of PPI/Element.pm, avg 539ns/call # 18723 times (13.3ms+0s) by PPI::Lexer::_add_delayed at line 1478 of PPI/Lexer.pm, avg 708ns/call # 18659 times (13.3ms+0s) by PPI::Lexer::_add_element at line 1456 of PPI/Lexer.pm, avg 714ns/call # 16471 times (9.49ms+0s) by PPI::Node::DESTROY at line 709 of PPI/Node.pm, avg 576ns/call # 10451 times (7.47ms+0s) by PPI::Statement::new at line 205 of PPI/Statement.pm, avg 715ns/call # 5789 times (4.95ms+0s) by PPI::Structure::new at line 132 of PPI/Structure.pm, avg 854ns/call # 5789 times (4.38ms+0s) by PPI::Lexer::_lex_structure at line 1360 of PPI/Lexer.pm, avg 756ns/call # 5789 times (2.49ms+0s) by List::MoreUtils::firstidx at line 345 of PPI/Element.pm, avg 430ns/call # 2437 times (1.13ms+0s) by List::MoreUtils::firstidx at line 416 of PPI/Element.pm, avg 464ns/call # 576 times (459µs+0s) by PPI::Lexer::_lex_end at line 677 of PPI/Lexer.pm, avg 796ns/call # 339 times (192µs+0s) by PPI::Element::sprevious_sibling at line 413 of PPI/Element.pm, avg 567ns/call # 339 times (176µs+0s) by PPI::Element::sprevious_sibling at line 412 of PPI/Element.pm, avg 519ns/call # 286 times (174µs+0s) by PPI::Element::statement at line 284 of PPI/Element.pm, avg 607ns/call # 226 times (123µs+0s) by PPI::Element::next_sibling at line 342 of PPI/Element.pm, avg 545ns/call # 226 times (121µs+0s) by PPI::Element::next_sibling at line 341 of PPI/Element.pm, avg 535ns/call # 27 times (14µs+0s) by PPI::Element::top at line 306 of PPI/Element.pm, avg 519ns/call
sub Scalar::Util::refaddr; # xsub
# spent 12µs within Scalar::Util::reftype which was called 6 times, avg 2µs/call: # 6 times (12µs+0s) by Sub::Install::_CODELIKE at line 23 of Sub/Install.pm, avg 2µs/call
sub Scalar::Util::reftype; # xsub
# spent 94.8ms within Scalar::Util::weaken which was called 110696 times, avg 856ns/call: # 50565 times (40.1ms+0s) by PPI::Lexer::_add_element at line 1462 of PPI/Lexer.pm, avg 793ns/call # 18723 times (15.7ms+0s) by PPI::Lexer::_add_delayed at line 1478 of PPI/Lexer.pm, avg 836ns/call # 18659 times (14.3ms+0s) by PPI::Lexer::_add_element at line 1456 of PPI/Lexer.pm, avg 768ns/call # 10451 times (11.9ms+0s) by PPI::Statement::new at line 205 of PPI/Statement.pm, avg 1µs/call # 5789 times (6.88ms+0s) by PPI::Structure::new at line 132 of PPI/Structure.pm, avg 1µs/call # 5789 times (4.99ms+0s) by PPI::Lexer::_lex_structure at line 1360 of PPI/Lexer.pm, avg 862ns/call # 576 times (497µs+0s) by PPI::Lexer::_lex_end at line 677 of PPI/Lexer.pm, avg 863ns/call # 144 times (422µs+0s) by Perl::Critic::Document::find at line 176 of Perl/Critic/Document.pm, avg 3µs/call
sub Scalar::Util::weaken; # xsub