Filename | C:/tmp64ng/perl/lib/ExtUtils/MM.pm |
Statements | Executed 39 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 0s | 0s | BEGIN@3 | ExtUtils::MM::
1 | 1 | 1 | 0s | 0s | BEGIN@4 | ExtUtils::MM::
2 | 2 | 1 | 0s | 0s | CORE:match (opcode) | ExtUtils::MM::
1 | 1 | 1 | 0s | 0s | _assert | ExtUtils::MM::
1 | 1 | 1 | 0s | 0s | _is_win95 | ExtUtils::MM::
0 | 0 | 0 | 0s | 0s | DESTROY | MM::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package ExtUtils::MM; | ||||
2 | |||||
3 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM::BEGIN@3 which was called:
# once (0s+0s) by main::BEGIN@1 at line 3 # spent 0s making 1 call to ExtUtils::MM::BEGIN@3
# spent 0s making 1 call to strict::import |
4 | 2 | 0s | 2 | 0s | # spent 0s within ExtUtils::MM::BEGIN@4 which was called:
# once (0s+0s) by main::BEGIN@1 at line 4 # spent 0s making 1 call to ExtUtils::MM::BEGIN@4
# spent 0s making 1 call to ExtUtils::MakeMaker::Config::import |
5 | |||||
6 | 1 | 0s | our $VERSION = '7.04'; | ||
7 | |||||
8 | 1 | 0s | require ExtUtils::Liblist; | ||
9 | 1 | 0s | require ExtUtils::MakeMaker; | ||
10 | 1 | 0s | our @ISA = qw(ExtUtils::Liblist ExtUtils::MakeMaker); | ||
11 | |||||
12 | =head1 NAME | ||||
13 | |||||
14 | ExtUtils::MM - OS adjusted ExtUtils::MakeMaker subclass | ||||
15 | |||||
16 | =head1 SYNOPSIS | ||||
17 | |||||
18 | require ExtUtils::MM; | ||||
19 | my $mm = MM->new(...); | ||||
20 | |||||
21 | =head1 DESCRIPTION | ||||
22 | |||||
23 | B<FOR INTERNAL USE ONLY> | ||||
24 | |||||
25 | ExtUtils::MM is a subclass of ExtUtils::MakeMaker which automatically | ||||
26 | chooses the appropriate OS specific subclass for you | ||||
27 | (ie. ExtUils::MM_Unix, etc...). | ||||
28 | |||||
29 | It also provides a convenient alias via the MM class (I didn't want | ||||
30 | MakeMaker modules outside of ExtUtils/). | ||||
31 | |||||
32 | This class might turn out to be a temporary solution, but MM won't go | ||||
33 | away. | ||||
34 | |||||
35 | =cut | ||||
36 | |||||
37 | { | ||||
38 | # Convenient alias. | ||||
39 | 1 | 0s | package MM; | ||
40 | 1 | 0s | our @ISA = qw(ExtUtils::MM); | ||
41 | sub DESTROY {} | ||||
42 | } | ||||
43 | |||||
44 | # spent 0s within ExtUtils::MM::_is_win95 which was called:
# once (0s+0s) by main::BEGIN@1 at line 56 | ||||
45 | # miniperl might not have the Win32 functions available and we need | ||||
46 | # to run in miniperl. | ||||
47 | 2 | 0s | my $have_win32 = eval { require Win32 }; | ||
48 | 1 | 0s | 1 | 0s | return $have_win32 && defined &Win32::IsWin95 ? Win32::IsWin95() # spent 0s making 1 call to Win32::IsWin95 |
49 | : ! defined $ENV{SYSTEMROOT}; | ||||
50 | } | ||||
51 | |||||
52 | 1 | 0s | my %Is = (); | ||
53 | 1 | 0s | $Is{VMS} = $^O eq 'VMS'; | ||
54 | 1 | 0s | $Is{OS2} = $^O eq 'os2'; | ||
55 | 1 | 0s | $Is{MacOS} = $^O eq 'MacOS'; | ||
56 | 1 | 0s | 1 | 0s | if( $^O eq 'MSWin32' ) { # spent 0s making 1 call to ExtUtils::MM::_is_win95 |
57 | _is_win95() ? $Is{Win95} = 1 : $Is{Win32} = 1; | ||||
58 | } | ||||
59 | 1 | 0s | 1 | 0s | $Is{UWIN} = $^O =~ /^uwin(-nt)?$/; # spent 0s making 1 call to ExtUtils::MM::CORE:match |
60 | 1 | 0s | $Is{Cygwin} = $^O eq 'cygwin'; | ||
61 | 1 | 0s | $Is{NW5} = $Config{osname} eq 'NetWare'; # intentional | ||
62 | 1 | 0s | 1 | 0s | $Is{BeOS} = ($^O =~ /beos/i or $^O eq 'haiku'); # spent 0s making 1 call to ExtUtils::MM::CORE:match |
63 | 1 | 0s | $Is{DOS} = $^O eq 'dos'; | ||
64 | 1 | 0s | if( $Is{NW5} ) { | ||
65 | $^O = 'NetWare'; | ||||
66 | delete $Is{Win32}; | ||||
67 | } | ||||
68 | 1 | 0s | $Is{VOS} = $^O eq 'vos'; | ||
69 | 1 | 0s | $Is{QNX} = $^O eq 'qnx'; | ||
70 | 1 | 0s | $Is{AIX} = $^O eq 'aix'; | ||
71 | 1 | 0s | $Is{Darwin} = $^O eq 'darwin'; | ||
72 | |||||
73 | 1 | 0s | $Is{Unix} = !grep { $_ } values %Is; | ||
74 | |||||
75 | 1 | 0s | map { delete $Is{$_} unless $Is{$_} } keys %Is; | ||
76 | 1 | 0s | 1 | 0s | _assert( keys %Is == 1 ); # spent 0s making 1 call to ExtUtils::MM::_assert |
77 | 1 | 0s | my($OS) = keys %Is; | ||
78 | |||||
79 | |||||
80 | 1 | 0s | my $class = "ExtUtils::MM_$OS"; | ||
81 | 1 | 0s | eval "require $class" unless $INC{"ExtUtils/MM_$OS.pm"}; ## no critic # spent 0s executing statements in string eval | ||
82 | 1 | 0s | die $@ if $@; | ||
83 | 1 | 0s | unshift @ISA, $class; | ||
84 | |||||
85 | |||||
86 | # spent 0s within ExtUtils::MM::_assert which was called:
# once (0s+0s) by main::BEGIN@1 at line 76 | ||||
87 | 1 | 0s | my $sanity = shift; | ||
88 | 1 | 0s | die sprintf "Assert failed at %s line %d\n", (caller)[1,2] unless $sanity; | ||
89 | 1 | 0s | return; | ||
90 | } | ||||
sub ExtUtils::MM::CORE:match; # opcode |