← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:03 2021

Filename/usr/local/lib/perl5/5.32/overloading.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0soverloading::::BEGIN@2overloading::BEGIN@2
0000s0soverloading::::_ops_to_numsoverloading::_ops_to_nums
0000s0soverloading::::importoverloading::import
0000s0soverloading::::unimportoverloading::unimport
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package overloading;
2use warnings;
3
4our $VERSION = '0.02';
5
6my $HINT_NO_AMAGIC = 0x01000000; # see perl.h
7
8require 5.010001;
9
10sub _ops_to_nums {
11 require overload::numbers;
12
13 map { exists $overload::numbers::names{"($_"}
14 ? $overload::numbers::names{"($_"}
15 : do { require Carp; Carp::croak("'$_' is not a valid overload") }
16 } @_;
17}
18
19sub import {
20 my ( $class, @ops ) = @_;
21
22 if ( @ops ) {
23 if ( $^H{overloading} ) {
24 vec($^H{overloading} , $_, 1) = 0 for _ops_to_nums(@ops);
25 }
26
27 if ( $^H{overloading} !~ /[^\0]/ ) {
28 delete $^H{overloading};
29 $^H &= ~$HINT_NO_AMAGIC;
30 }
31 } else {
32 delete $^H{overloading};
33 $^H &= ~$HINT_NO_AMAGIC;
34 }
35}
36
37sub unimport {
38 my ( $class, @ops ) = @_;
39
40 if ( exists $^H{overloading} or not $^H & $HINT_NO_AMAGIC ) {
41 if ( @ops ) {
42 vec($^H{overloading} ||= '', $_, 1) = 1 for _ops_to_nums(@ops);
43 } else {
44 delete $^H{overloading};
45 }
46 }
47
48 $^H |= $HINT_NO_AMAGIC;
49}
50
511;
52__END__