| Filename | /usr/lib/x86_64-linux-gnu/perl/5.28/File/Glob.pm |
| Statements | Executed 21 statements in 718µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 16µs | 16µs | File::Glob::BEGIN@78 |
| 1 | 1 | 1 | 14µs | 18µs | File::Glob::BEGIN@3 |
| 1 | 1 | 1 | 10µs | 15µs | File::Glob::BEGIN@58 |
| 1 | 1 | 1 | 7µs | 28µs | File::Glob::BEGIN@54 |
| 1 | 1 | 1 | 2µs | 2µs | File::Glob::BEGIN@79 |
| 1 | 1 | 1 | 2µs | 2µs | File::Glob::CORE:match (opcode) |
| 1 | 1 | 1 | 700ns | 700ns | File::Glob::GLOB_CSH (xsub) |
| 0 | 0 | 0 | 0s | 0s | File::Glob::glob |
| 0 | 0 | 0 | 0s | 0s | File::Glob::import |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package File::Glob; | ||||
| 2 | |||||
| 3 | 2 | 196µs | 2 | 21µs | # spent 18µs (14+4) within File::Glob::BEGIN@3 which was called:
# once (14µs+4µs) by RBM::BEGIN@53 at line 3 # spent 18µs making 1 call to File::Glob::BEGIN@3
# spent 4µs making 1 call to strict::import |
| 4 | our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, $DEFAULT_FLAGS); | ||||
| 5 | |||||
| 6 | 1 | 200ns | require XSLoader; | ||
| 7 | |||||
| 8 | 1 | 6µ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 | 2µ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 | 1 | 2µs | $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}]; | ||
| 36 | 1 | 600ns | pop @{$EXPORT_TAGS{bsd_glob}}; # no "glob" | ||
| 37 | |||||
| 38 | 1 | 2µs | @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob'); | ||
| 39 | |||||
| 40 | 1 | 200ns | $VERSION = '1.31'; | ||
| 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 | 45µs | 2 | 48µs | # spent 28µs (7+20) within File::Glob::BEGIN@54 which was called:
# once (7µs+20µs) by RBM::BEGIN@53 at line 54 # spent 28µs making 1 call to File::Glob::BEGIN@54
# spent 20µs making 1 call to warnings::unimport |
| 55 | *CORE::GLOBAL::glob = \&File::Glob::csh_glob; | ||||
| 56 | } | ||||
| 57 | elsif ($_ eq ':bsd_glob') { | ||||
| 58 | 2 | 146µs | 2 | 20µs | # spent 15µs (10+5) within File::Glob::BEGIN@58 which was called:
# once (10µs+5µs) by RBM::BEGIN@53 at line 58 # spent 15µs making 1 call to File::Glob::BEGIN@58
# spent 5µs making 1 call to strict::unimport |
| 59 | $passthrough = 1; | ||||
| 60 | } | ||||
| 61 | else { | ||||
| 62 | $passthrough = 1; | ||||
| 63 | } | ||||
| 64 | $passthrough; | ||||
| 65 | } @_); | ||||
| 66 | } | ||||
| 67 | |||||
| 68 | 1 | 176µs | 1 | 169µs | XSLoader::load(); # spent 169µs making 1 call to XSLoader::load |
| 69 | |||||
| 70 | 1 | 5µs | 1 | 700ns | $DEFAULT_FLAGS = GLOB_CSH(); # spent 700ns making 1 call to File::Glob::GLOB_CSH |
| 71 | 1 | 7µs | 1 | 2µs | if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) { # spent 2µ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 | 2 | 39µs | 1 | 16µs | # spent 16µs within File::Glob::BEGIN@78 which was called:
# once (16µs+0s) by RBM::BEGIN@53 at line 78 # spent 16µs making 1 call to File::Glob::BEGIN@78 |
| 79 | 2 | 78µs | 1 | 2µs | # spent 2µs within File::Glob::BEGIN@79 which was called:
# once (2µs+0s) by RBM::BEGIN@53 at line 79 # spent 2µs making 1 call to File::Glob::BEGIN@79 |
| 80 | warnings::warnif (deprecated => | ||||
| 81 | "File::Glob::glob() will disappear in perl 5.30. " . | ||||
| 82 | "Use File::Glob::bsd_glob() instead.") unless state $warned ++; | ||||
| 83 | |||||
| 84 | splice @_, 1; # no flags | ||||
| 85 | goto &bsd_glob; | ||||
| 86 | } | ||||
| 87 | |||||
| 88 | 1 | 14µs | 1; | ||
| 89 | __END__ | ||||
# spent 2µs within File::Glob::CORE:match which was called:
# once (2µs+0s) by RBM::BEGIN@53 at line 71 | |||||
# spent 700ns within File::Glob::GLOB_CSH which was called:
# once (700ns+0s) by RBM::BEGIN@53 at line 70 |