← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Sun Nov 5 02:36:06 2017
Reported on Sun Nov 5 02:56:19 2017

Filename/usr/local/lib/perl5/5.24/mach/Scalar/Util.pm
StatementsExecuted 13 statements in 1.04ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11145µs58µsScalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
33131µs31µsScalar::Util::::dualvarScalar::Util::dualvar (xsub)
21121µs21µsScalar::Util::::taintedScalar::Util::tainted (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
92658µs270µs
# spent 58µs (45+12) within Scalar::Util::BEGIN@9 which was called: # once (45µs+12µs) by Net::DNS::Resolver::Base::BEGIN@46 at line 9
use strict;
# spent 58µs making 1 call to Scalar::Util::BEGIN@9 # spent 12µs making 1 call to strict::import
1015µsrequire Exporter;
11
12115µsour @ISA = qw(Exporter);
1316µ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);
1912µsour $VERSION = "1.42_02";
20131µs$VERSION = eval $VERSION;
# spent 6µs executing statements in string eval
21
221235µsrequire List::Util; # List::Util loads the XS
23144µs123µsList::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863)
# spent 23µs making 1 call to version::_VERSION
24
25our @EXPORT_FAIL;
26
2712µsunless (defined &weaken) {
28 push @EXPORT_FAIL, qw(weaken);
29}
3012µsunless (defined &isweak) {
31 push @EXPORT_FAIL, qw(isweak isvstring);
32}
3311µsunless (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
58137µs1;
59
60__END__
 
# spent 31µs within Scalar::Util::dualvar which was called 3 times, avg 10µs/call: # once (14µs+0s) by IO::Socket::SSL::BEGIN@247 at line 250 of IO/Socket/SSL.pm # once (10µs+0s) by IO::Socket::SSL::BEGIN@293 at line 293 of IO/Socket/SSL.pm # once (7µs+0s) by IO::Socket::SSL::BEGIN@291 at line 291 of IO/Socket/SSL.pm
sub Scalar::Util::dualvar; # xsub
# spent 21µs within Scalar::Util::tainted which was called 2 times, avg 11µs/call: # 2 times (21µs+0s) by File::Spec::Unix::_tmpdir at line 185 of File/Spec/Unix.pm, avg 11µs/call
sub Scalar::Util::tainted; # xsub