1 package Module::Install::With;
3 # See POD at end for docs
6 use Module::Install::Base ();
8 use vars qw{$VERSION @ISA $ISCORE};
11 @ISA = 'Module::Install::Base';
19 #####################################################################
22 # Are we targeting ExtUtils::MakeMaker (running as Makefile.PL)
24 !! ($0 =~ /Makefile.PL$/i);
27 # You should not be using this, but we'll keep the hook anyways
29 !! ($0 =~ /Build.PL$/i);
36 #####################################################################
37 # Testing and Configuration Contexts
43 The 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
45 and other similar types of things).
47 Returns true if in an interactive environment, or false otherwise.
52 # Treat things interactively ONLY based on input
53 !! (-t STDIN and ! automated_testing());
58 =head2 automated_testing
60 Are we currently running in an automated testing environment, such as
63 This is primarily a cleaner and more human-readable equivalent of
64 checking $ENV{AUTOMATED_TESTING} yourself, but may be improved in line
65 with best practices at a later date.
69 sub automated_testing {
70 !! $ENV{AUTOMATED_TESTING};
75 =head2 release_testing
77 Are we currently running in an release testing environment. That is,
78 are we in the process of running in a potential highly-intensive and
79 high dependency bloat testing process prior to packaging a module for
82 This is primarily a cleaner and more human-readable equivalent of
83 checking $ENV{RELEASE_TESTING} yourself, but may be improved in line
84 with best practices at a later date.
89 !! $ENV{RELEASE_TESTING};
93 !! $Module::Install::AUTHOR;
100 #####################################################################
101 # Operating System Convenience
107 The C<win32> function tests if the Makefile.PL is currently running in a
108 native Microsoft Windows Perl, such as ActivePerl or Strawberry Perl.
110 This is primarily a cleaner and more human-readable equivalent of
111 checking C<$^O eq 'MSWin32'> yourself, but may be improved in line
112 with best practices at a later date.
117 !! ($^O eq 'MSWin32');
124 The C<winlike> function tests if the Makefile.PL is currently running
125 in a Microsoft Windows Perl, under either cygwin or a native Win32 Perl.
127 This is primarily a cleaner and more human-readable equivalent of
128 checking C<$^O eq 'MSWin32' or $^O eq 'cygwin'>yourself, but may be
129 improved in line with best practices at a later date.
134 !! ($^O eq 'MSWin32' or $^O eq 'cygwin');
147 Adam Kennedy E<lt>adamk@cpan.orgE<gt>
151 Copyright 2007 - 2009 Adam Kennedy.
153 This program is free software; you can redistribute
154 it and/or modify it under the same terms as Perl itself.
156 The full text of the license can be found in the
157 LICENSE file included with this module.