Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Module / Install / With.pm
CommitLineData
3fea05b9 1package Module::Install::With;
2
3# See POD at end for docs
4
5use strict;
6use Module::Install::Base ();
7
8use vars qw{$VERSION @ISA $ISCORE};
9BEGIN {
10 $VERSION = '0.91';
11 @ISA = 'Module::Install::Base';
12 $ISCORE = 1;
13}
14
15
16
17
18
19#####################################################################
20# Installer Target
21
22# Are we targeting ExtUtils::MakeMaker (running as Makefile.PL)
23sub eumm {
24 !! ($0 =~ /Makefile.PL$/i);
25}
26
27# You should not be using this, but we'll keep the hook anyways
28sub mb {
29 !! ($0 =~ /Build.PL$/i);
30}
31
32
33
34
35
36#####################################################################
37# Testing and Configuration Contexts
38
39=pod
40
41=head2 interactive
42
43The C<interactive> function tests for an install that has a user present
44(or at least, one in which it is reasonable for us to present prompts
45and other similar types of things).
46
47Returns true if in an interactive environment, or false otherwise.
48
49=cut
50
51sub interactive {
52 # Treat things interactively ONLY based on input
53 !! (-t STDIN and ! automated_testing());
54}
55
56=pod
57
58=head2 automated_testing
59
60Are we currently running in an automated testing environment, such as
61CPAN Testers.
62
63This is primarily a cleaner and more human-readable equivalent of
64checking $ENV{AUTOMATED_TESTING} yourself, but may be improved in line
65with best practices at a later date.
66
67=cut
68
69sub automated_testing {
70 !! $ENV{AUTOMATED_TESTING};
71}
72
73=pod
74
75=head2 release_testing
76
77Are we currently running in an release testing environment. That is,
78are we in the process of running in a potential highly-intensive and
79high dependency bloat testing process prior to packaging a module for
80release.
81
82This is primarily a cleaner and more human-readable equivalent of
83checking $ENV{RELEASE_TESTING} yourself, but may be improved in line
84with best practices at a later date.
85
86=cut
87
88sub release_testing {
89 !! $ENV{RELEASE_TESTING};
90}
91
92sub author_context {
93 !! $Module::Install::AUTHOR;
94}
95
96
97
98
99
100#####################################################################
101# Operating System Convenience
102
103=pod
104
105=head2 win32
106
107The C<win32> function tests if the Makefile.PL is currently running in a
108native Microsoft Windows Perl, such as ActivePerl or Strawberry Perl.
109
110This is primarily a cleaner and more human-readable equivalent of
111checking C<$^O eq 'MSWin32'> yourself, but may be improved in line
112with best practices at a later date.
113
114=cut
115
116sub win32 {
117 !! ($^O eq 'MSWin32');
118}
119
120=pod
121
122=head2 winlike
123
124The C<winlike> function tests if the Makefile.PL is currently running
125in a Microsoft Windows Perl, under either cygwin or a native Win32 Perl.
126
127This is primarily a cleaner and more human-readable equivalent of
128checking C<$^O eq 'MSWin32' or $^O eq 'cygwin'>yourself, but may be
129improved in line with best practices at a later date.
130
131=cut
132
133sub winlike {
134 !! ($^O eq 'MSWin32' or $^O eq 'cygwin');
135}
136
1371;
138
139=pod
140
141=head1 SEE ALSO
142
143L<Module::Install>
144
145=head1 AUTHORS
146
147Adam Kennedy E<lt>adamk@cpan.orgE<gt>
148
149=head1 COPYRIGHT
150
151Copyright 2007 - 2009 Adam Kennedy.
152
153This program is free software; you can redistribute
154it and/or modify it under the same terms as Perl itself.
155
156The full text of the license can be found in the
157LICENSE file included with this module.
158
159=cut