Skip Menu |

This queue is for tickets about the XML-Smart CPAN distribution.

Report information
The Basics
Id: 2732
Status: resolved
Priority: 0/
Queue: XML-Smart

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.1
Fixed in: (no value)



Subject: test.pl should use ExtUtils::MakeMaker's prompt function
test.pl should use ExtUtils::MakeMaker's prompt function Other Handy Functions prompt my $value = prompt($message); my $value = prompt($message, $default); The prompt() function provides an easy way to request user input used to write a makefile. It displays the $message as a prompt for input. If a $default is provided it will be used as a default. The function returns the $value selected by the user. If prompt() detects that it is not running interactively and there is nothing on STDIN or if the PERL_MM_USE_DEFAULT environment variable is set to true, the $default will be used without prompting. This prevents automated processes from blocking on user input. If no $default is provided an empty string will be used instead.
All you need to do is replace print "\nURL: $url\n" ; print "Do you want to test XML::Smart with an URL? (y|n*) " ; chomp( my $opt = <STDIN>); with use ExtUtils::MakeMake qw[ prompt ]; my $opt = prompt(" URL: $url Do you want to test XML::Smart with an URL?","n");