[libinline-java-perl] 162/398: ok

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.55
in repository libinline-java-perl.

commit 9d0f3811a19e04f7653c4b6b69eb6cafbb99db47
Author: patrick_leb <>
Date:   Tue Jan 29 22:00:28 2002 +0000

    ok
---
 Java.pm          |  4 ++--
 Java/Init.pm     | 12 ++----------
 Java/JVM.pm      |  3 +--
 Java/Makefile.PL |  1 -
 Java/Portable.pm | 22 ++++++++++++----------
 MANIFEST         |  1 +
 Makefile.PL      |  1 -
 7 files changed, 18 insertions(+), 26 deletions(-)

diff --git a/Java.pm b/Java.pm
index 0736e2c..5f0af29 100644
--- a/Java.pm
+++ b/Java.pm
@@ -592,8 +592,8 @@ sub load {
 		my $st = $pc->ServerType() ;
 		if ((($st eq "shared")&&(! $o->get_java_config('SHARED_JVM')))||
 			(($st eq "private")&&($o->get_java_config('SHARED_JVM')))){
-				croak "JVM type mismatch on port " . $o->get_java_config('PORT') ;
-			}
+			croak "JVM type mismatch on port " . $o->get_java_config('PORT') ;
+		}
 	}
 
 	# Add our Inline object to the list.
diff --git a/Java/Init.pm b/Java/Init.pm
index f44115c..61178d2 100644
--- a/Java/Init.pm
+++ b/Java/Init.pm
@@ -96,7 +96,8 @@ public class InlineJavaServer {
 			ss = new ServerSocket(port) ;	
 		}
 		catch (IOException e){
-			System.err.println("Can't open server socket on port " + String.valueOf(port)) ;
+			System.err.println("Can't open server socket on port " + String.valueOf(port) +
+				": " + e.getMessage()) ;
 			System.err.flush() ;
 			System.exit(1) ;
 		}
@@ -126,15 +127,6 @@ public class InlineJavaServer {
 
 	private void init(){
 		instance = this ;
-
-		try {
-			System.out.close() ;
-			System.in.close() ;
-		}
-		catch (IOException e){
-			System.err.println("IO error: " + e.getMessage()) ;
-			System.err.flush() ;
-		}
 	}
 
 	
diff --git a/Java/JVM.pm b/Java/JVM.pm
index b3e06b7..16d0bb9 100644
--- a/Java/JVM.pm
+++ b/Java/JVM.pm
@@ -102,7 +102,6 @@ sub launch {
 	my $this = shift ;
 	my $cmd = shift ;
 
-
 	local $SIG{__WARN__} = sub {} ;
 
 	my $dn = File::Spec->devnull() ;
@@ -152,7 +151,7 @@ sub fork_launch {
 		}
 		close($c2p) ;
 		Inline::Java::set_DONE() ;
-		exit() ;
+		CORE::exit() ;
 	}
 	else{
 		# Parent
diff --git a/Java/Makefile.PL b/Java/Makefile.PL
index 101d3f1..49e0162 100644
--- a/Java/Makefile.PL
+++ b/Java/Makefile.PL
@@ -5,7 +5,6 @@ use strict ;
 use File::Spec ;
 
 require "Portable.pm" ;
-Inline::Java::Portable::use_alone() ;
 
 # Some shortcuts while developing
 my $jdk_dir = undef ;
diff --git a/Java/Portable.pm b/Java/Portable.pm
index bcace17..f4dc396 100644
--- a/Java/Portable.pm
+++ b/Java/Portable.pm
@@ -29,9 +29,11 @@ my $COMMAND_COM =
 	) || 0 ;
 
 
-# Used when this module is used by itself, this stubs the requirements
-sub use_alone {
-	*Inline::Java::debug = sub {} ;
+
+sub debug {
+	if (Inline::Java->can("debug")){
+		return Inline::Java::debug(@_) ;
+	}
 }
 
 
@@ -126,11 +128,11 @@ sub portable {
 				my $f = $map->{$^O}->{$key}->[0] ;
 				my $t = $map->{$^O}->{$key}->[1] ;
 				$val =~ s/$f/$t/g ;
-				Inline::Java::debug("portable: $key => $val for $^O is '$val'") ;
+				Inline::Java::Portable::debug("portable: $key => $val for $^O is '$val'") ;
 				return $val ;
 			}
 			else{
-				Inline::Java::debug("portable: $key for $^O is 'undef'") ;
+				Inline::Java::Portable::debug("portable: $key for $^O is 'undef'") ;
 				return undef ;
 			}
 		}
@@ -138,7 +140,7 @@ sub portable {
 			my $sub = $map->{$^O}->{$key} ;
 			if (defined($sub)){
 				$val = $sub->($val) ;
-				Inline::Java::debug("portable: $key => $val for $^O is '$val'") ;
+				Inline::Java::Portable::debug("portable: $key => $val for $^O is '$val'") ;
 				return $val ;
 			}
 			else{
@@ -146,21 +148,21 @@ sub portable {
 			}
 		}
 		else{
-			Inline::Java::debug("portable: $key for $^O is '$map->{$^O}->{$key}'") ;
+			Inline::Java::Portable::debug("portable: $key for $^O is '$map->{$^O}->{$key}'") ;
 			return $map->{$^O}->{$key} ;
 		}
 	}
 	else{
 		if ($key =~ /^RE_/){
-			Inline::Java::debug("portable: $key => $val for $^O is default '$val'") ;
+			Inline::Java::Portable::debug("portable: $key => $val for $^O is default '$val'") ;
 			return $val ;
 		}
 		if ($key =~ /^SUB_/){
-			Inline::Java::debug("portable: $key => $val for $^O is default '$val'") ;
+			Inline::Java::Portable::debug("portable: $key => $val for $^O is default '$val'") ;
 			return $val ;
 		}
 		else{
-			Inline::Java::debug("portable: $key for $^O is default '$defmap->{$key}'") ;
+			Inline::Java::Portable::debug("portable: $key for $^O is default '$defmap->{$key}'") ;
 			return $defmap->{$key} ;
 		}
 	}
diff --git a/MANIFEST b/MANIFEST
index 3d33aed..2a81517 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -32,6 +32,7 @@ t/10_2_shared_start.t
 t/10_3_shared_use.t
 t/10_4_shared_stop.t
 t/10_5_shared_fork.t
+t/10_6_shared_sim.t
 t/11_exceptions.t
 t/12_callbacks.t
 t/types.java
diff --git a/Makefile.PL b/Makefile.PL
index 5323206..cdfa467 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -3,7 +3,6 @@ use ExtUtils::MakeMaker ;
 use strict ;
 
 require "Java/Portable.pm" ;
-Inline::Java::Portable::use_alone() ;
 
 # Replace everything just like out-of-the-box...
 rename("Java/JNI.xs_", "Java/JNI.xs") ;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git



More information about the Pkg-perl-cvs-commits mailing list