Profile of subs.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For bin/dpath
Run on Tue Jun 5 15:31:33 2012
Reported on Tue Jun 5 15:31:51 2012

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/subs.pm
Statements | Executed 21 statements in 377µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 304µs | 304µs | subs::::importsubs::import

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package subs;
2 |  |  |  |  |
3 | 1 | 2µs |  |  | our $VERSION = '1.00';
4 |  |  |  |  |
5 |  |  |  |  | =head1 NAME
6 |  |  |  |  |
7 |  |  |  |  | subs - 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 |  |  |  |  |
16 |  |  |  |  | This will predeclare all the subroutine whose names are
17 |  |  |  |  | in the list, allowing you to use them without parentheses
18 |  |  |  |  | even before they're declared.
19 |  |  |  |  |
20 |  |  |  |  | Unlike pragmas that affect the C<$^H> hints variable, the C<use vars> and
21 |  |  |  |  | C<use subs> declarations are not BLOCK-scoped. They are thus effective
22 |  |  |  |  | for the entire file in which they appear. You may not rescind such
23 |  |  |  |  | declarations with C<no vars> or C<no subs>.
24 |  |  |  |  |
25 |  |  |  |  | See L<perlmodlib/Pragmatic Modules> and L<strict/strict subs>.
26 |  |  |  |  |
27 |  |  |  |  | =cut
28 |  |  |  |  |
29 | 1 | 48µs |  |  | require 5.000;
30 |  |  |  |  |
31 |  |  |  |  | # spent 304µs within subs::import which was called: # once (304µs+0s) by Opcode::BEGIN@29 at line 29 of Opcode.pm sub import {
32 | 1 | 3µs |  |  | my $callpack = caller;
33 | 1 | 2µs |  |  | my $pack = shift;
34 | 1 | 12µs |  |  | my @imports = @_;
35 | 1 | 28µs |  |  | foreach $sym (@imports) {
36 | 14 | 270µs |  |  | *{"${callpack}::$sym"} = \&{"${callpack}::$sym"};
37 |  |  |  |  | }
38 |  |  |  |  | };
39 |  |  |  |  |
40 | 1 | 12µs |  |  | 1;