Profile of Scalar/Util.pm

← Index
NYTProf Performance Profile «line view»
For -e
Run on Thu Jun 30 16:34:56 2016
Reported on Thu Jun 30 16:35:09 2016

Filename | /home/s1/perl5/perlbrew/perls/perl-5.22.1/lib/site_perl/5.22.1/x86_64-linux/Scalar/Util.pm
Statements | Executed 15 statements in 563µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 16µs | 18µs | Scalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
1 | 1 | 1 | 8µs | 12µs | Scalar::Util::::BEGIN@10Scalar::Util::BEGIN@10
0 | 0 | 0 | 0s | 0s | Scalar::Util::::export_failScalar::Util::export_fail
0 | 0 | 0 | 0s | 0s | Scalar::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 |  |  |  |  |
7 |  |  |  |  | package Scalar::Util;
8 |  |  |  |  |
9 | 2 | 26µs | 2 | 20µs | # spent 18µs (16+2) within Scalar::Util::BEGIN@9 which was called: # once (16µs+2µs) by DateTime::Helpers::BEGIN@8 at line 9 use strict; # spent 18µs making 1 call to Scalar::Util::BEGIN@9 # spent 2µs making 1 call to strict::import
10 | 2 | 300µs | 2 | 16µs | # spent 12µs (8+4) within Scalar::Util::BEGIN@10 which was called: # once (8µs+4µs) by DateTime::Helpers::BEGIN@8 at line 10 use warnings; # spent 12µs making 1 call to Scalar::Util::BEGIN@10 # spent 4µs making 1 call to warnings::import
11 | 1 | 500ns |  |  | require Exporter;
12 |  |  |  |  |
13 | 1 | 6µs |  |  | our @ISA = qw(Exporter);
14 | 1 | 2µs |  |  | our @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 |  |  |  |  | );
20 | 1 | 300ns |  |  | our $VERSION = "1.45";
21 | 1 | 14µs |  |  | $VERSION = eval $VERSION; # spent 2µs executing statements in string eval
22 |  |  |  |  |
23 | 1 | 185µs |  |  | require List::Util; # List::Util loads the XS
24 | 1 | 20µs | 1 | 12µs | List::Util->VERSION( $VERSION ); # Ensure we got the right XS version (RT#100863) # spent 12µs making 1 call to UNIVERSAL::VERSION
25 |  |  |  |  |
26 |  |  |  |  | our @EXPORT_FAIL;
27 |  |  |  |  |
28 | 1 | 500ns |  |  | unless (defined &weaken) {
29 |  |  |  |  | push @EXPORT_FAIL, qw(weaken);
30 |  |  |  |  | }
31 | 1 | 200ns |  |  | unless (defined &isweak) {
32 |  |  |  |  | push @EXPORT_FAIL, qw(isweak isvstring);
33 |  |  |  |  | }
34 | 1 | 100ns |  |  | unless (defined &isvstring) {
35 |  |  |  |  | push @EXPORT_FAIL, qw(isvstring);
36 |  |  |  |  | }
37 |  |  |  |  |
38 |  |  |  |  | sub 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
53 |  |  |  |  | sub set_prototype(&$)
54 |  |  |  |  | {
55 |  |  |  |  | my ( $code, $proto ) = @_;
56 |  |  |  |  | return Sub::Util::set_prototype( $proto, $code );
57 |  |  |  |  | }
58 |  |  |  |  |
59 | 1 | 8µs |  |  | 1;
60 |  |  |  |  |
61 |  |  |  |  | __END__