Hi,

I'm trying to convert a legacy project that uses Embperl to Carton (a simple package management system for perl projects).

I've been running into issues because Embperl's Makefile doesn't properly handle non interactive properly. I've reported the issue with carton, and was suggested that Embperl needs to handle PERL_MM_USE_DEFAULT (https://github.com/miyagawa/carton/issues/143)

I've attached a very simple patch to convert your GetString function to use ExtUtils::MakeMaker's patch function.

Thanks,

Gavin
diff -ru Embperl-2.4.0-orig/Makefile.PL Embperl-2.4.0/Makefile.PL
--- Embperl-2.4.0-orig/Makefile.PL	2010-03-18 06:38:02.000000000 -0700
+++ Embperl-2.4.0/Makefile.PL	2013-10-01 17:18:51.911095921 -0700
@@ -337,20 +337,7 @@
 sub GetString
 	{
 	my ($prompt, $default) = @_ ;
-
-	printf ("%s [%s]", $prompt, $default) ;
-	chomp ($_ = <STDIN>) ;
-	s/\s+$//;
-        if (!/^\s*$/)
-	    {return $_ ;}
-	else
-    	{
-        if ($_ eq "")
-	        {return $default ;}
-	    else
-            { return "" ; }
-    
-        }
+	return prompt($prompt,$default);
     }
 
 ## ----------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-h...@perl.apache.org

Reply via email to