← Index
NYTProf Performance Profile   « line view »
For bin/benchmark-perlformance
  Run on Fri Apr 17 15:31:48 2015
Reported on Fri Apr 17 15:32:02 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3/subs.pm
StatementsExecuted 21 statements in 63µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11151µs51µssubs::::importsubs::import
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package subs;
2
31400nsour $VERSION = '1.01';
4
5=head1 NAME
6
7subs - Perl pragma to predeclare sub names
8
9=head1 SYNOPSIS
10
11 use subs qw(frob);
12 frob 3..10;
13
14=head1 DESCRIPTION
15
16This will predeclare all the subroutine whose names are
17in the list, allowing you to use them without parentheses
18even before they're declared.
19
20Unlike pragmas that affect the C<$^H> hints variable, the C<use vars> and
21C<use subs> declarations are not BLOCK-scoped. They are thus effective
22for the entire package in which they appear. You may not rescind such
23declarations with C<no vars> or C<no subs>.
24
25See L<perlmodlib/Pragmatic Modules> and L<strict/strict subs>.
26
27=cut
28
2917µsrequire 5.000;
30
31
# spent 51µs within subs::import which was called: # once (51µs+0s) by Opcode::BEGIN@29 at line 29 of Opcode.pm
sub import {
321500ns my $callpack = caller;
331300ns my $pack = shift;
3412µs my @imports = @_;
3515µs foreach $sym (@imports) {
361445µs *{"${callpack}::$sym"} = \&{"${callpack}::$sym"};
37 }
38};
39
4012µs1;