]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed bug in compute
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 21 Nov 2008 06:48:00 +0000 (06:48 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Fri, 21 Nov 2008 06:48:00 +0000 (06:48 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@318 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index ebf51a908d988c0fb7ca2497345dc7adf6d25ac9..4d6ec7eef5eee974004338ae1309036a92918b55 100644 (file)
@@ -5545,7 +5545,7 @@ sub script_compute
     {
         if ( $options->{ "eval" } )
         {
-            if ( $options->{ "eval" } =~ /^(.+)\s*=\s*(.+)$/ )
+            if ( $options->{ "eval" } =~ /^(\S+)\s*=\s*(.+)$/ )
             {
                 $eval_key = $1;
                 $eval_val = $2;
@@ -5559,7 +5559,8 @@ sub script_compute
 
                 map { $eval_val =~ s/\Q$_\E/$record->{ $_ }/g } @keys;
 
-                $record->{ $eval_key } = eval "$eval_val" or Maasha::Common::error( "eval failed -> $@" );
+                $record->{ $eval_key } = eval "$eval_val";
+                Maasha::Common::error( qq(eval "$eval_key = $eval_val" failed -> $@) ) if $@;
             }
             else
             {