Filename | /usr/local/lib/perl5/5.24/mach/File/Glob.pm |
Statements | Executed 20 statements in 1.46ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 51µs | 64µs | BEGIN@3 | File::Glob::
1 | 1 | 1 | 23µs | 88µs | BEGIN@54 | File::Glob::
1 | 1 | 1 | 20µs | 36µs | BEGIN@58 | File::Glob::
1 | 1 | 1 | 8µs | 8µs | CORE:match (opcode) | File::Glob::
1 | 1 | 1 | 3µs | 3µs | GLOB_CSH (xsub) | File::Glob::
0 | 0 | 0 | 0s | 0s | glob | File::Glob::
0 | 0 | 0 | 0s | 0s | import | File::Glob::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package File::Glob; | ||||
2 | |||||
3 | 2 | 423µs | 2 | 77µs | # spent 64µs (51+13) within File::Glob::BEGIN@3 which was called:
# once (51µs+13µs) by Mail::SpamAssassin::Util::BEGIN@1750 at line 3 # spent 64µs making 1 call to File::Glob::BEGIN@3
# spent 13µs making 1 call to strict::import |
4 | our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, $DEFAULT_FLAGS); | ||||
5 | |||||
6 | 1 | 3µs | require XSLoader; | ||
7 | |||||
8 | 1 | 19µs | @ISA = qw(Exporter); | ||
9 | |||||
10 | # NOTE: The glob() export is only here for compatibility with 5.6.0. | ||||
11 | # csh_glob() should not be used directly, unless you know what you're doing. | ||||
12 | |||||
13 | 1 | 7µs | %EXPORT_TAGS = ( | ||
14 | 'glob' => [ qw( | ||||
15 | GLOB_ABEND | ||||
16 | GLOB_ALPHASORT | ||||
17 | GLOB_ALTDIRFUNC | ||||
18 | GLOB_BRACE | ||||
19 | GLOB_CSH | ||||
20 | GLOB_ERR | ||||
21 | GLOB_ERROR | ||||
22 | GLOB_LIMIT | ||||
23 | GLOB_MARK | ||||
24 | GLOB_NOCASE | ||||
25 | GLOB_NOCHECK | ||||
26 | GLOB_NOMAGIC | ||||
27 | GLOB_NOSORT | ||||
28 | GLOB_NOSPACE | ||||
29 | GLOB_QUOTE | ||||
30 | GLOB_TILDE | ||||
31 | bsd_glob | ||||
32 | glob | ||||
33 | ) ], | ||||
34 | ); | ||||
35 | 2 | 10µs | $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}]; | ||
36 | 2 | 10µs | pop @{$EXPORT_TAGS{bsd_glob}}; # no "glob" | ||
37 | |||||
38 | 2 | 9µs | @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob'); | ||
39 | |||||
40 | 1 | 2µs | $VERSION = '1.26'; | ||
41 | |||||
42 | sub import { | ||||
43 | require Exporter; | ||||
44 | local $Exporter::ExportLevel = $Exporter::ExportLevel + 1; | ||||
45 | Exporter::import(grep { | ||||
46 | my $passthrough; | ||||
47 | if ($_ eq ':case') { | ||||
48 | $DEFAULT_FLAGS &= ~GLOB_NOCASE() | ||||
49 | } | ||||
50 | elsif ($_ eq ':nocase') { | ||||
51 | $DEFAULT_FLAGS |= GLOB_NOCASE(); | ||||
52 | } | ||||
53 | elsif ($_ eq ':globally') { | ||||
54 | 2 | 93µs | 2 | 154µs | # spent 88µs (23+65) within File::Glob::BEGIN@54 which was called:
# once (23µs+65µs) by Mail::SpamAssassin::Util::BEGIN@1750 at line 54 # spent 88µs making 1 call to File::Glob::BEGIN@54
# spent 65µs making 1 call to warnings::unimport |
55 | *CORE::GLOBAL::glob = \&File::Glob::csh_glob; | ||||
56 | } | ||||
57 | elsif ($_ eq ':bsd_glob') { | ||||
58 | 2 | 380µs | 2 | 51µs | # spent 36µs (20+15) within File::Glob::BEGIN@58 which was called:
# once (20µs+15µs) by Mail::SpamAssassin::Util::BEGIN@1750 at line 58 # spent 36µs making 1 call to File::Glob::BEGIN@58
# spent 15µs making 1 call to strict::unimport |
59 | $passthrough = 1; | ||||
60 | } | ||||
61 | else { | ||||
62 | $passthrough = 1; | ||||
63 | } | ||||
64 | $passthrough; | ||||
65 | } @_); | ||||
66 | } | ||||
67 | |||||
68 | 1 | 432µs | 1 | 414µs | XSLoader::load(); # spent 414µs making 1 call to XSLoader::load |
69 | |||||
70 | 1 | 15µs | 1 | 3µs | $DEFAULT_FLAGS = GLOB_CSH(); # spent 3µs making 1 call to File::Glob::GLOB_CSH |
71 | 1 | 29µs | 1 | 8µs | if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) { # spent 8µs making 1 call to File::Glob::CORE:match |
72 | $DEFAULT_FLAGS |= GLOB_NOCASE(); | ||||
73 | } | ||||
74 | |||||
75 | # File::Glob::glob() is deprecated because its prototype is different from | ||||
76 | # CORE::glob() (use bsd_glob() instead) | ||||
77 | sub glob { | ||||
78 | splice @_, 1; # no flags | ||||
79 | goto &bsd_glob; | ||||
80 | } | ||||
81 | |||||
82 | 1 | 31µs | 1; | ||
83 | __END__ | ||||
# spent 8µs within File::Glob::CORE:match which was called:
# once (8µs+0s) by Mail::SpamAssassin::Util::BEGIN@1750 at line 71 | |||||
# spent 3µs within File::Glob::GLOB_CSH which was called:
# once (3µs+0s) by Mail::SpamAssassin::Util::BEGIN@1750 at line 70 |