← Index
NYTProf Performance Profile   « line view »
For index.cgi
  Run on Sat May 9 17:18:47 2020
Reported on Sat May 9 17:19:07 2020

Filename/usr/local/lib/perl/5.18.2/Scalar/Util.pm
StatementsExecuted 16 statements in 448µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
208330µs30µsScalar::Util::::weakenScalar::Util::weaken (xsub)
141120µs20µsScalar::Util::::reftypeScalar::Util::reftype (xsub)
11112µs28µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
132211µs11µsScalar::Util::::blessedScalar::Util::blessed (xsub)
1119µs14µsScalar::Util::::BEGIN@10Scalar::Util::BEGIN@10
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
9230µs244µs
# spent 28µs (12+16) within Scalar::Util::BEGIN@9 which was called: # once (12µs+16µs) by Moo::HandleMoose::_TypeMap::BEGIN@10 at line 9
use strict;
# spent 28µs making 1 call to Scalar::Util::BEGIN@9 # spent 16µs making 1 call to strict::import
102359µs220µs
# spent 14µs (9+5) within Scalar::Util::BEGIN@10 which was called: # once (9µs+5µs) by Moo::HandleMoose::_TypeMap::BEGIN@10 at line 10
use warnings;
# spent 14µs making 1 call to Scalar::Util::BEGIN@10 # spent 5µs making 1 call to warnings::import
111700nsrequire Exporter;
12
1317µsour @ISA = qw(Exporter);
1413µsour @EXPORT_OK = qw(
15 blessed refaddr reftype weaken unweaken isweak
16
17 dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
18 tainted
19);
201600nsour $VERSION = "1.50";
21115µs$VERSION = eval $VERSION;
# spent 3µs executing statements in string eval
22
231500nsrequire List::Util; # List::Util loads the XS
24122µs114µsList::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863)
# spent 14µs making 1 call to UNIVERSAL::VERSION
25
261400nsour @EXPORT_FAIL;
27
281600nsunless (defined &weaken) {
29 push @EXPORT_FAIL, qw(weaken);
30}
311400nsunless (defined &isweak) {
32 push @EXPORT_FAIL, qw(isweak isvstring);
33}
341100nsunless (defined &isvstring) {
35 push @EXPORT_FAIL, qw(isvstring);
36}
37
38sub export_fail {
39 if (grep { /^(?:weaken|isweak)$/ } @_ ) {
40 require Carp;
41 Carp::croak("Weak references are not implemented in the version of perl");
42 }
43
44 if (grep { /^isvstring$/ } @_ ) {
45 require Carp;
46 Carp::croak("Vstrings are not implemented in the version of perl");
47 }
48
49 @_;
50}
51
52# set_prototype has been moved to Sub::Util with a different interface
53sub set_prototype(&$)
54{
55 my ( $code, $proto ) = @_;
56 return Sub::Util::set_prototype( $proto, $code );
57}
58
5919µs1;
60
61__END__
 
# spent 11µs within Scalar::Util::blessed which was called 13 times, avg 846ns/call: # 12 times (9µs+0s) by Method::Generate::Accessor::_generate_call_code at line 455 of Method/Generate/Accessor.pm, avg 783ns/call # once (2µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm
sub Scalar::Util::blessed; # xsub
# spent 20µs within Scalar::Util::reftype which was called 14 times, avg 1µs/call: # 14 times (20µs+0s) by Sub::Install::_CODELIKE at line 84 of Sub/Install.pm, avg 1µs/call
sub Scalar::Util::reftype; # xsub
# spent 30µs within Scalar::Util::weaken which was called 20 times, avg 2µs/call: # 4 times (10µs+0s) by Sub::Defer::defer_sub at line 70 of Sub/Defer.pm, avg 3µs/call # 4 times (4µs+0s) by Sub::Defer::defer_sub at line 71 of Sub/Defer.pm, avg 1µs/call # 2 times (4µs+0s) by Sub::Quote::unquote_sub at line 173 of Sub/Quote.pm, avg 2µs/call # 2 times (3µs+0s) by Method::Generate::Constructor::install_delayed at line 104 of Method/Generate/Constructor.pm, avg 2µs/call # 2 times (2µs+0s) by Method::Generate::Constructor::__ANON__[/usr/local/share/perl/5.18.2/Method/Generate/Constructor.pm:102] at line 100 of Method/Generate/Constructor.pm, avg 1µs/call # 2 times (2µs+0s) by Sub::Quote::quote_sub at line 109 of Sub/Quote.pm, avg 1µs/call # 2 times (2µs+0s) by Sub::Quote::quote_sub at line 111 of Sub/Quote.pm, avg 850ns/call # 2 times (2µs+0s) by Sub::Quote::quote_sub at line 110 of Sub/Quote.pm, avg 850ns/call
sub Scalar::Util::weaken; # xsub