Author: spadkins
Date: Fri Mar 12 07:10:34 2010
New Revision: 13840

Modified:
   p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm

Log:
allow support for {} in expression by supporting the 
leading-equals-sign-means-no-substitutions

Modified: p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm (original)
+++ p5ee/trunk/App-Repository/lib/App/Repository/DBI.pm Fri Mar 12 07:10:34 2010
@@ -860,7 +860,10 @@
 
         my $dbexpr = $column_def->{dbexpr};
 
-        if ($dbexpr =~ /{/) { #SEB
+        if ($dbexpr =~ s/^=//) {
+            # do nothing
+        }
+        elsif ($dbexpr =~ /{/) { #SEB
             $dbexpr = $self->substitute($dbexpr, $params);
         }
 
@@ -1201,7 +1204,10 @@
         ############################################################
         # allow param substitutions in dbexpr
         ############################################################
-        if ($dbexpr =~ /{/) {  #}
+        if ($dbexpr =~ s/^=//) {
+            # do nothing. This literal expression should not have any 
substitutions done.
+        }
+        elsif ($dbexpr =~ /{/) {  #}
             $dbexpr = $self->substitute($dbexpr, $params);
         }
 

Reply via email to