X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/ed6b886ec45bbaeceda49b2a035f3d84953be57c..89e2d2f33c90af3dbbe7745b80ee60030264b01c:/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm index 103c0c8..897b833 100644 --- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm +++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder.pm @@ -1,60 +1,13 @@ package ExtUtils::CBuilder; - +$ExtUtils::CBuilder::VERSION = '0.280227'; use File::Spec (); use File::Path (); use File::Basename (); +use Perl::OSType qw/os_type/; -use vars qw($VERSION @ISA); -$VERSION = '0.280201'; -$VERSION = eval $VERSION; - -# Okay, this is the brute-force method of finding out what kind of -# platform we're on. I don't know of a systematic way. These values -# came from the latest (bleadperl) perlport.pod. - -my %OSTYPES = qw( - aix Unix - bsdos Unix - dgux Unix - dynixptx Unix - freebsd Unix - linux Unix - hpux Unix - irix Unix - darwin Unix - machten Unix - next Unix - openbsd Unix - netbsd Unix - dec_osf Unix - svr4 Unix - svr5 Unix - sco_sv Unix - unicos Unix - unicosmk Unix - solaris Unix - sunos Unix - cygwin Unix - os2 Unix - gnu Unix - gnukfreebsd Unix - haiku Unix - - dos Windows - MSWin32 Windows - - os390 EBCDIC - os400 EBCDIC - posix-bc EBCDIC - vmesa EBCDIC - - MacOS MacOS - VMS VMS - VOS VOS - riscos RiscOS - amigaos Amiga - mpeix MPEiX - ); +use warnings; +use strict; +use vars qw(@ISA); # We only use this once - don't waste a symbol table entry on it. # More importantly, don't make it an inheritable method. @@ -67,21 +20,21 @@ my $load = sub { { my @package = split /::/, __PACKAGE__; - + + my $ostype = os_type(); + if (grep {-e File::Spec->catfile($_, @package, 'Platform', $^O) . '.pm'} @INC) { - $load->(__PACKAGE__ . "::Platform::$^O"); - - } elsif (exists $OSTYPES{$^O} and - grep {-e File::Spec->catfile($_, @package, 'Platform', $OSTYPES{$^O}) . '.pm'} @INC) { - $load->(__PACKAGE__ . "::Platform::$OSTYPES{$^O}"); - + $load->(__PACKAGE__ . "::Platform::$^O"); + + } elsif ( $ostype && + grep {-e File::Spec->catfile($_, @package, 'Platform', $ostype) . '.pm'} @INC) { + $load->(__PACKAGE__ . "::Platform::$ostype"); + } else { - $load->(__PACKAGE__ . "::Base"); + $load->(__PACKAGE__ . "::Base"); } } -sub os_type { $OSTYPES{$^O} } - 1; __END__ @@ -313,10 +266,23 @@ other platform-specific issues. Ilya Zakharevich has contributed fixes for OS/2; John E. Malmberg and Peter Prymmer have done likewise for VMS. +=head1 SUPPORT + +ExtUtils::CBuilder is maintained as part of the Perl 5 core. Please +submit any bug reports via the F tool included with Perl 5. +Bug reports will be included in the Perl 5 ticket system at +L. + +The Perl 5 source code is available at +and ExtUtils-CBuilder may be found in the F directory +of the repository. + =head1 AUTHOR Ken Williams, kwilliams@cpan.org +Additional contributions by The Perl 5 Porters. + =head1 COPYRIGHT Copyright (c) 2003-2005 Ken Williams. All rights reserved.