| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package ExtUtils::CBuilder; | 
| 2 |  |  |  |  |  |  | our $VERSION = '0.280236'; # VERSION | 
| 3 |  |  |  |  |  |  |  | 
| 4 | 4 |  |  | 4 |  | 220422 | use File::Spec (); | 
|  | 4 |  |  |  |  | 35 |  | 
|  | 4 |  |  |  |  | 95 |  | 
| 5 | 4 |  |  | 4 |  | 22 | use File::Path (); | 
|  | 4 |  |  |  |  | 5 |  | 
|  | 4 |  |  |  |  | 55 |  | 
| 6 | 4 |  |  | 4 |  | 19 | use File::Basename (); | 
|  | 4 |  |  |  |  | 8 |  | 
|  | 4 |  |  |  |  | 101 |  | 
| 7 | 4 |  |  | 4 |  | 2043 | use Perl::OSType qw/os_type/; | 
|  | 4 |  |  |  |  | 1767 |  | 
|  | 4 |  |  |  |  | 233 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 | 4 |  |  | 4 |  | 27 | use warnings; | 
|  | 4 |  |  |  |  | 8 |  | 
|  | 4 |  |  |  |  | 94 |  | 
| 10 | 4 |  |  | 4 |  | 20 | use strict; | 
|  | 4 |  |  |  |  | 31 |  | 
|  | 4 |  |  |  |  | 1146 |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 |  |  |  |  |  |  | our @ISA; | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  | # We only use this once - don't waste a symbol table entry on it. | 
| 15 |  |  |  |  |  |  | # More importantly, don't make it an inheritable method. | 
| 16 |  |  |  |  |  |  | my $load = sub { | 
| 17 |  |  |  |  |  |  | my $mod = shift; | 
| 18 | 4 |  |  | 4 |  | 1913 | eval "use $mod"; | 
|  | 4 |  |  |  |  | 18 |  | 
|  | 4 |  |  |  |  | 99 |  | 
| 19 |  |  |  |  |  |  | die $@ if $@; | 
| 20 |  |  |  |  |  |  | @ISA = ($mod); | 
| 21 |  |  |  |  |  |  | }; | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | { | 
| 24 |  |  |  |  |  |  | my @package = split /::/, __PACKAGE__; | 
| 25 |  |  |  |  |  |  |  | 
| 26 |  |  |  |  |  |  | my $ostype = os_type(); | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | if (grep {-e File::Spec->catfile($_, @package, 'Platform', $^O) . '.pm'} @INC) { | 
| 29 |  |  |  |  |  |  | $load->(__PACKAGE__ . "::Platform::$^O"); | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | } elsif ( $ostype && | 
| 32 |  |  |  |  |  |  | grep {-e File::Spec->catfile($_, @package, 'Platform', $ostype) . '.pm'} @INC) { | 
| 33 |  |  |  |  |  |  | $load->(__PACKAGE__ . "::Platform::$ostype"); | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | } else { | 
| 36 |  |  |  |  |  |  | $load->(__PACKAGE__ . "::Base"); | 
| 37 |  |  |  |  |  |  | } | 
| 38 |  |  |  |  |  |  | } | 
| 39 |  |  |  |  |  |  |  | 
| 40 |  |  |  |  |  |  | 1; | 
| 41 |  |  |  |  |  |  | __END__ |