Filename | /Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/darwin-2level/File/Glob.pm |
Statements | Executed 26 statements in 1.40ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 30µs | 33µs | BEGIN@3 | File::Glob::
1 | 1 | 1 | 14µs | 41µs | BEGIN@50 | File::Glob::
1 | 1 | 1 | 10µs | 13µs | BEGIN@54 | File::Glob::
1 | 1 | 1 | 10µs | 181µs | import | File::Glob::
1 | 1 | 1 | 3µs | 3µs | CORE:match (opcode) | File::Glob::
2 | 2 | 2 | 1µs | 1µs | GLOB_CSH (xsub) | File::Glob::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package File::Glob; | ||||
2 | |||||
3 | 2 | 264µs | 2 | 36µs | # spent 33µs (30+3) within File::Glob::BEGIN@3 which was called:
# once (30µs+3µs) by File::GlobMapper::BEGIN@10 at line 3 # spent 33µs making 1 call to File::Glob::BEGIN@3
# spent 3µs making 1 call to strict::import |
4 | our($DEFAULT_FLAGS); | ||||
5 | |||||
6 | 1 | 1µs | require XSLoader; | ||
7 | |||||
8 | # NOTE: The glob() export is only here for compatibility with 5.6.0. | ||||
9 | # csh_glob() should not be used directly, unless you know what you're doing. | ||||
10 | |||||
11 | 1 | 4µs | our %EXPORT_TAGS = ( | ||
12 | 'glob' => [ qw( | ||||
13 | GLOB_ABEND | ||||
14 | GLOB_ALPHASORT | ||||
15 | GLOB_ALTDIRFUNC | ||||
16 | GLOB_BRACE | ||||
17 | GLOB_CSH | ||||
18 | GLOB_ERR | ||||
19 | GLOB_ERROR | ||||
20 | GLOB_LIMIT | ||||
21 | GLOB_MARK | ||||
22 | GLOB_NOCASE | ||||
23 | GLOB_NOCHECK | ||||
24 | GLOB_NOMAGIC | ||||
25 | GLOB_NOSORT | ||||
26 | GLOB_NOSPACE | ||||
27 | GLOB_QUOTE | ||||
28 | GLOB_TILDE | ||||
29 | bsd_glob | ||||
30 | ) ], | ||||
31 | ); | ||||
32 | 1 | 20µs | $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}]; | ||
33 | |||||
34 | 1 | 2µs | our @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob'); | ||
35 | |||||
36 | 1 | 0s | our $VERSION = '1.37'; | ||
37 | |||||
38 | # spent 181µs (10+171) within File::Glob::import which was called:
# once (10µs+171µs) by File::GlobMapper::BEGIN@10 at line 19 of File/GlobMapper.pm | ||||
39 | 1 | 1µs | require Exporter; | ||
40 | 1 | 1µs | local $Exporter::ExportLevel = $Exporter::ExportLevel + 1; | ||
41 | Exporter::import(grep { | ||||
42 | 3 | 5µs | 1 | 171µs | my $passthrough; # spent 171µs making 1 call to Exporter::import |
43 | 2 | 1µs | if ($_ eq ':case') { | ||
44 | $DEFAULT_FLAGS &= ~GLOB_NOCASE() | ||||
45 | } | ||||
46 | elsif ($_ eq ':nocase') { | ||||
47 | $DEFAULT_FLAGS |= GLOB_NOCASE(); | ||||
48 | } | ||||
49 | elsif ($_ eq ':globally') { | ||||
50 | 2 | 58µs | 2 | 68µs | # spent 41µs (14+27) within File::Glob::BEGIN@50 which was called:
# once (14µs+27µs) by File::GlobMapper::BEGIN@10 at line 50 # spent 41µs making 1 call to File::Glob::BEGIN@50
# spent 27µs making 1 call to warnings::unimport |
51 | *CORE::GLOBAL::glob = \&File::Glob::csh_glob; | ||||
52 | } | ||||
53 | elsif ($_ eq ':bsd_glob') { | ||||
54 | 2 | 267µs | 2 | 16µs | # spent 13µs (10+3) within File::Glob::BEGIN@54 which was called:
# once (10µs+3µs) by File::GlobMapper::BEGIN@10 at line 54 # spent 13µs making 1 call to File::Glob::BEGIN@54
# spent 3µs making 1 call to strict::unimport |
55 | $passthrough = 1; | ||||
56 | } | ||||
57 | else { | ||||
58 | 2 | 0s | $passthrough = 1; | ||
59 | } | ||||
60 | 2 | 0s | $passthrough; | ||
61 | } @_); | ||||
62 | } | ||||
63 | |||||
64 | 1 | 753µs | 1 | 744µs | XSLoader::load(); # spent 744µs making 1 call to XSLoader::load |
65 | |||||
66 | 1 | 5µs | 1 | 1µs | $DEFAULT_FLAGS = GLOB_CSH(); # spent 1µs making 1 call to File::Glob::GLOB_CSH |
67 | 1 | 7µs | 1 | 3µs | if ($^O =~ /^(?:MSWin32|VMS|os2|riscos)$/) { # spent 3µs making 1 call to File::Glob::CORE:match |
68 | $DEFAULT_FLAGS |= GLOB_NOCASE(); | ||||
69 | } | ||||
70 | |||||
71 | 1 | 14µs | 1; | ||
72 | __END__ | ||||
# spent 3µs within File::Glob::CORE:match which was called:
# once (3µs+0s) by File::GlobMapper::BEGIN@10 at line 67 | |||||
# spent 1µs within File::Glob::GLOB_CSH which was called 2 times, avg 500ns/call:
# once (1µs+0s) by File::GlobMapper::BEGIN@10 at line 66
# once (0s+0s) by File::GlobMapper::BEGIN@10 at line 20 of File/GlobMapper.pm |