Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Data-UUID CPAN distribution.

Report information
The Basics
Id: 8046
Status: resolved
Priority: 0/
Queue: Data-UUID

People
Owner: Nobody in particular
Requestors: schwern [...] pobox.com
Cc:
AdminCc:

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



Subject: Use ExtUtils::MakeMaker::prompt()
Data::UUID will not install via CPANPLUS because the Makefile.PL hangs waiting for a prompt. This is half CPANPLUS' fault and half Data::UUID. CPANPLUS is not setting PERL_MM_USE_DEFAULT as it should. Data::UUID should be smarter about when to accept its defaults, like when STDIN is closed or not a tty. Fortunately, ExtUtils::MakeMaker::prompt() supplies such functionality. A patch is attached to have your Makefile.PL use prompt().
--- Makefile.PL 2004/10/19 06:33:40 1.1 +++ Makefile.PL 2004/10/19 06:37:50 @@ -49,18 +49,16 @@ 'OBJECT' => '$(O_FILES)', # link all the C files too 'CONFIGURE' => sub { - my ($d, $m); - # automate installations - as per Heath Malmstrom - if(!$ENV{PERL_MM_USE_DEFAULT}) { - do { print "UUID state storage (/var/tmp): "; - } while !($d = <STDIN>, chop $d, -d $d || !$d); - do { print "default umask (0007): "; - } while !($m = <STDIN>, chop $m, ($m =~ /[0-7]{3}/) || !$m); - } - chmod(0666, sprintf("%s/%s", $d||"/var/tmp", ".UUID_NODEID")); - chmod(0666, sprintf("%s/%s", $d||"/var/tmp", ".UUID_STATE")); - return { 'DEFINE' => qq(-D_STDIR=\\").($d||"/var/tmp").qq(\\"). + my $d = '/var/tmp'; + $d = prompt("UUID state storage", $d); + + my $m = '0007'; + $m = prompt("default umask", $m); + + chmod(0666, sprintf("%s/%s", $d, ".UUID_NODEID")); + chmod(0666, sprintf("%s/%s", $d, ".UUID_STATE")); + return { 'DEFINE' => qq(-D_STDIR=\\"$d\\"). qq( -D__$Config{osname}__). - qq( -D_DEFAULT_UMASK=).($m||"0007")}; + qq( -D_DEFAULT_UMASK=$m)}; } );