Hi,

Here's a rough cut at documentation for the hitherto rumored prompt() 
function.  Suggestions welcome.

-- c
diff -ur ExtUtils-MakeMaker-6.03~/lib/ExtUtils/MakeMaker.pm ExtUtils-MakeMaker-6.03/lib/ExtUtils/MakeMaker.pm
--- ExtUtils-MakeMaker-6.03~/lib/ExtUtils/MakeMaker.pm	Wed Jun 19 14:07:36 2002
+++ ExtUtils-MakeMaker-6.03/lib/ExtUtils/MakeMaker.pm	Sun Aug 18 18:44:32 2002
@@ -2310,6 +2310,27 @@
 
 =back
 
+=head1 Other Handy Functions
+
+=over 4
+
+=item * prompt( $message, $default )
+
+The C<prompt()> function provides an easy way to request user input used to
+write a makefile.  It displays the first argument as a prompt for input.  If
+the second argument is provided, its value will be used as a default.  The
+function returns the selected value.  
+
+If prompt() detects that it is not running in interactive mode (say, if it is
+running from CPAN or CPANPLUS), or if PERL_MM_USE_DEFAULT is set to
+true, the default value will be used without prompting.  This prevents
+automated processes from blocking on user input.
+
+If no default is provided as an argument, the default default value is a single
+space character.
+
+=back
+
 =head1 SEE ALSO
 
 ExtUtils::MM_Unix, ExtUtils::Manifest ExtUtils::Install,

Reply via email to