| Filename | /home/ss5/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/x86_64-linux/File/Spec/Functions.pm |
| Statements | Executed 65 statements in 322µs |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 9µs | 9µs | File::Spec::Functions::BEGIN@3 |
| 1 | 1 | 1 | 5µs | 13µs | File::Spec::Functions::BEGIN@54 |
| 1 | 1 | 1 | 5µs | 6µs | File::Spec::Functions::BEGIN@4 |
| 1 | 1 | 1 | 4µs | 33µs | File::Spec::Functions::BEGIN@6 |
| 0 | 0 | 0 | 0s | 0s | File::Spec::Functions::__ANON__[:62] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package File::Spec::Functions; | ||||
| 2 | |||||
| 3 | 2 | 20µs | 1 | 9µs | # spent 9µs within File::Spec::Functions::BEGIN@3 which was called:
# once (9µs+0s) by CHI::Util::BEGIN@8 at line 3 # spent 9µs making 1 call to File::Spec::Functions::BEGIN@3 |
| 4 | 2 | 14µs | 2 | 8µs | # spent 6µs (5+2) within File::Spec::Functions::BEGIN@4 which was called:
# once (5µs+2µs) by CHI::Util::BEGIN@8 at line 4 # spent 6µs making 1 call to File::Spec::Functions::BEGIN@4
# spent 2µs making 1 call to strict::import |
| 5 | |||||
| 6 | 2 | 80µs | 2 | 62µs | # spent 33µs (4+29) within File::Spec::Functions::BEGIN@6 which was called:
# once (4µs+29µs) by CHI::Util::BEGIN@8 at line 6 # spent 33µs making 1 call to File::Spec::Functions::BEGIN@6
# spent 29µs making 1 call to vars::import |
| 7 | |||||
| 8 | 1 | 200ns | $VERSION = '3.62'; | ||
| 9 | 1 | 1µs | $VERSION =~ tr/_//d; | ||
| 10 | |||||
| 11 | 1 | 300ns | require Exporter; | ||
| 12 | |||||
| 13 | 1 | 3µs | @ISA = qw(Exporter); | ||
| 14 | |||||
| 15 | 1 | 700ns | @EXPORT = qw( | ||
| 16 | canonpath | ||||
| 17 | catdir | ||||
| 18 | catfile | ||||
| 19 | curdir | ||||
| 20 | rootdir | ||||
| 21 | updir | ||||
| 22 | no_upwards | ||||
| 23 | file_name_is_absolute | ||||
| 24 | path | ||||
| 25 | ); | ||||
| 26 | |||||
| 27 | 1 | 500ns | @EXPORT_OK = qw( | ||
| 28 | devnull | ||||
| 29 | tmpdir | ||||
| 30 | splitpath | ||||
| 31 | splitdir | ||||
| 32 | catpath | ||||
| 33 | abs2rel | ||||
| 34 | rel2abs | ||||
| 35 | case_tolerant | ||||
| 36 | ); | ||||
| 37 | |||||
| 38 | 1 | 2µs | %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] ); | ||
| 39 | |||||
| 40 | 1 | 400ns | require File::Spec::Unix; | ||
| 41 | 1 | 4µs | my %udeps = ( | ||
| 42 | canonpath => [], | ||||
| 43 | catdir => [qw(canonpath)], | ||||
| 44 | catfile => [qw(canonpath catdir)], | ||||
| 45 | case_tolerant => [], | ||||
| 46 | curdir => [], | ||||
| 47 | devnull => [], | ||||
| 48 | rootdir => [], | ||||
| 49 | updir => [], | ||||
| 50 | ); | ||||
| 51 | |||||
| 52 | 1 | 600ns | foreach my $meth (@EXPORT, @EXPORT_OK) { | ||
| 53 | 17 | 42µs | 17 | 23µs | my $sub = File::Spec->can($meth); # spent 23µs making 17 calls to UNIVERSAL::can, avg 1µs/call |
| 54 | 2 | 78µs | 2 | 21µs | # spent 13µs (5+8) within File::Spec::Functions::BEGIN@54 which was called:
# once (5µs+8µs) by CHI::Util::BEGIN@8 at line 54 # spent 13µs making 1 call to File::Spec::Functions::BEGIN@54
# spent 8µs making 1 call to strict::unimport |
| 55 | 17 | 48µs | 8 | 4µs | if (exists($udeps{$meth}) && $sub == File::Spec::Unix->can($meth) && # spent 4µs making 8 calls to UNIVERSAL::can, avg 462ns/call |
| 56 | !(grep { | ||||
| 57 | 3 | 8µs | 6 | 2µs | File::Spec->can($_) != File::Spec::Unix->can($_) # spent 2µs making 6 calls to UNIVERSAL::can, avg 317ns/call |
| 58 | } @{$udeps{$meth}}) && | ||||
| 59 | defined(&{"File::Spec::Unix::_fn_$meth"})) { | ||||
| 60 | *{$meth} = \&{"File::Spec::Unix::_fn_$meth"}; | ||||
| 61 | } else { | ||||
| 62 | 9 | 10µs | *{$meth} = sub {&$sub('File::Spec', @_)}; | ||
| 63 | } | ||||
| 64 | } | ||||
| 65 | |||||
| 66 | |||||
| 67 | 1 | 10µs | 1; | ||
| 68 | __END__ |