[vhffs-dev] [svn] commit: r284 - /branches/vhffs_4.1/vhffs-tools/src/vhffs-checkinstall

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Author: beuss
Date: Mon Nov  6 08:43:03 2006
New Revision: 284

Log:
Code complexity reduction and reliability improvment

Modified:
    branches/vhffs_4.1/vhffs-tools/src/vhffs-checkinstall

Modified: branches/vhffs_4.1/vhffs-tools/src/vhffs-checkinstall
==============================================================================
--- branches/vhffs_4.1/vhffs-tools/src/vhffs-checkinstall (original)
+++ branches/vhffs_4.1/vhffs-tools/src/vhffs-checkinstall Mon Nov  6 08:43:03 2006
@@ -12,28 +12,9 @@
 my $file;
 my $found;
 
-foreach $depname ( @DEPS )
+foreach ( @DEPS )
 {
-	$found = 0;
-	$dep = $depname;
-	$dep =~ s/::/\//g;
-	$dep .=".pm";
-
-	foreach $dir ( @INC )
-	{
-		$file = $dir . "/" . $dep;	
-		$found = 1 if( -f $file );
-	}
-
-	if( $found == 0 )
-	{
-		print "$depname module is not found by VHFFS\n";
-		print "/o\\ /o\\ /o\\ /o\\ /o\\  /o\\ /o\\ /o\\ /o\\ \n";
-		print "Please consult http://www.vhffs.org website to get documentation\n";
-		print "or found miss module on http://cpan.org website\n";
-		exit( 1 );
-	}
-
+	die ( "Module $_ isn't present" ) if ( eval("require $_") == 0);
 }
 
 print "Great, your system seems have all required modules\n";




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/