[LON-CAPA-cvs] cvs: loncom / LONCAPA.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 19 Jun 2006 10:00:27 -0000


albertel		Mon Jun 19 06:00:27 2006 EDT

  Modified files:              
    /loncom	LONCAPA.pm 
  Log:
  - death to unless
  
  
Index: loncom/LONCAPA.pm
diff -u loncom/LONCAPA.pm:1.6 loncom/LONCAPA.pm:1.7
--- loncom/LONCAPA.pm:1.6	Mon Jun 19 05:35:08 2006
+++ loncom/LONCAPA.pm	Mon Jun 19 06:00:27 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Base routines
 #
-# $Id: LONCAPA.pm,v 1.6 2006/06/19 09:35:08 www Exp $
+# $Id: LONCAPA.pm,v 1.7 2006/06/19 10:00:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -173,7 +173,7 @@
 sub locking_hash_tie {
     my ($filename,$how)=@_;
     my ($file_prefix,$namespace)=&db_filename_parts($filename);
-    unless ($namespace) { return undef; }
+    if ($namespace eq '') { return undef; }
     return &_locking_hash_tie($file_prefix,$namespace,$how);
 }
 
@@ -184,7 +184,7 @@
 sub db_filename_parts {
     my ($filename)=@_;
     my ($file_path,$namespace)=($filename=~/^(.*)\/([^\/]+)\.db$/);
-    unless ($namespace) { return undef; }
+    if ($namespace eq '') { return undef; }
     return ($file_path.'/'.$namespace,$namespace);
 }