← 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/if.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sif::::CORE:substif::CORE:subst (opcode)
0000s0sif::::importif::import
0000s0sif::::unimportif::unimport
0000s0sif::::workif::work
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package if;
2
3$VERSION = '0.0608';
4
5sub work {
6 my $method = shift() ? 'import' : 'unimport';
7 unless (@_ >= 2) {
8 my $type = ($method eq 'import') ? 'use' : 'no';
9 die "Too few arguments to '$type if' (some code returning an empty list in list context?)"
10 }
11 return unless shift; # CONDITION
12
13 my $p = $_[0]; # PACKAGE
14 (my $file = "$p.pm") =~ s!::!/!g;
15 require $file; # Works even if $_[0] is a keyword (like open)
16 my $m = $p->can($method);
17 goto &$m if $m;
18}
19
20sub import { shift; unshift @_, 1; goto &work }
21sub unimport { shift; unshift @_, 0; goto &work }
22
231;
24__END__