| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package File::Spec::Functions; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 71573 | use File::Spec; | 
|  | 1 |  |  |  |  | 10 |  | 
|  | 1 |  |  |  |  | 28 |  | 
| 4 | 1 |  |  | 1 |  | 5 | use strict; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 244 |  | 
| 5 |  |  |  |  |  |  |  | 
| 6 |  |  |  |  |  |  | our $VERSION = '3.75'; | 
| 7 |  |  |  |  |  |  | $VERSION =~ tr/_//d; | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | require Exporter; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | our @ISA = qw(Exporter); | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | our @EXPORT = qw( | 
| 14 |  |  |  |  |  |  | canonpath | 
| 15 |  |  |  |  |  |  | catdir | 
| 16 |  |  |  |  |  |  | catfile | 
| 17 |  |  |  |  |  |  | curdir | 
| 18 |  |  |  |  |  |  | rootdir | 
| 19 |  |  |  |  |  |  | updir | 
| 20 |  |  |  |  |  |  | no_upwards | 
| 21 |  |  |  |  |  |  | file_name_is_absolute | 
| 22 |  |  |  |  |  |  | path | 
| 23 |  |  |  |  |  |  | ); | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | our @EXPORT_OK = qw( | 
| 26 |  |  |  |  |  |  | devnull | 
| 27 |  |  |  |  |  |  | tmpdir | 
| 28 |  |  |  |  |  |  | splitpath | 
| 29 |  |  |  |  |  |  | splitdir | 
| 30 |  |  |  |  |  |  | catpath | 
| 31 |  |  |  |  |  |  | abs2rel | 
| 32 |  |  |  |  |  |  | rel2abs | 
| 33 |  |  |  |  |  |  | case_tolerant | 
| 34 |  |  |  |  |  |  | ); | 
| 35 |  |  |  |  |  |  |  | 
| 36 |  |  |  |  |  |  | our %EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] ); | 
| 37 |  |  |  |  |  |  |  | 
| 38 |  |  |  |  |  |  | require File::Spec::Unix; | 
| 39 |  |  |  |  |  |  | my %udeps = ( | 
| 40 |  |  |  |  |  |  | canonpath => [], | 
| 41 |  |  |  |  |  |  | catdir => [qw(canonpath)], | 
| 42 |  |  |  |  |  |  | catfile => [qw(canonpath catdir)], | 
| 43 |  |  |  |  |  |  | case_tolerant => [], | 
| 44 |  |  |  |  |  |  | curdir => [], | 
| 45 |  |  |  |  |  |  | devnull => [], | 
| 46 |  |  |  |  |  |  | rootdir => [], | 
| 47 |  |  |  |  |  |  | updir => [], | 
| 48 |  |  |  |  |  |  | ); | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | foreach my $meth (@EXPORT, @EXPORT_OK) { | 
| 51 |  |  |  |  |  |  | my $sub = File::Spec->can($meth); | 
| 52 | 1 |  |  | 1 |  | 10 | no strict 'refs'; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 218 |  | 
| 53 |  |  |  |  |  |  | if (exists($udeps{$meth}) && $sub == File::Spec::Unix->can($meth) && | 
| 54 |  |  |  |  |  |  | !(grep { | 
| 55 |  |  |  |  |  |  | File::Spec->can($_) != File::Spec::Unix->can($_) | 
| 56 |  |  |  |  |  |  | } @{$udeps{$meth}}) && | 
| 57 |  |  |  |  |  |  | defined(&{"File::Spec::Unix::_fn_$meth"})) { | 
| 58 |  |  |  |  |  |  | *{$meth} = \&{"File::Spec::Unix::_fn_$meth"}; | 
| 59 |  |  |  |  |  |  | } else { | 
| 60 | 0 |  |  | 0 |  |  | *{$meth} = sub {&$sub('File::Spec', @_)}; | 
| 61 |  |  |  |  |  |  | } | 
| 62 |  |  |  |  |  |  | } | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  |  | 
| 65 |  |  |  |  |  |  | 1; | 
| 66 |  |  |  |  |  |  | __END__ |