diff core/src/luan/modules/PackageLuan.java @ 462:2e79b47d02a2

remove all command line options; add add_extension boolean arg to scheme fns;
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 06 May 2015 16:54:20 -0600
parents 5b36f663a1b8
children 92c3d22745b8
line wrap: on
line diff
--- a/core/src/luan/modules/PackageLuan.java	Wed May 06 14:51:23 2015 -0600
+++ b/core/src/luan/modules/PackageLuan.java	Wed May 06 16:54:20 2015 -0600
@@ -46,7 +46,7 @@
 			if( modName.startsWith("java:") ) {
 				mod = JavaLuan.load(luan,modName.substring(5));
 			} else {
-				String src = read(luan,modName+".luan");
+				String src = read(luan,modName,true);
 				if( src == null )
 					return null;
 				LuanTable env = new LuanTable();
@@ -61,8 +61,8 @@
 		return mod;
 	}
 
-	static String read(LuanState luan,String uri) throws LuanException {
-		LuanTable t = IoLuan.uri(luan,uri);
+	static String read(LuanState luan,String uri,Boolean addExtension) throws LuanException {
+		LuanTable t = IoLuan.uri(luan,uri,addExtension);
 		if( t == null )
 			return null;
 		LuanFunction existsFn = (LuanFunction)t.get(luan,"exists");