remove unpack
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 26 May 2010 18:58:09 +0000 (20:58 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 26 May 2010 19:49:30 +0000 (21:49 +0200)
It's not strict enough to be really useful

README
lib/MojoFacets/Data.pm

diff --git a/README b/README
index a6d72ca..3745ca1 100644 (file)
--- a/README
+++ b/README
@@ -8,7 +8,6 @@ Put JSON file from Simile Exhibit project in data/ with extension .js or .json
 Alternative format is pipe (|) separated text files with extension .txt
 First column is always header with field names
 Multi-line values should be wrapped in ^multi-line-text^
-Multiple values for one field are supported for: number, number
 
 
 Start with:
index e69c16e..0ac4746 100644 (file)
@@ -96,10 +96,7 @@ sub _load_path {
                        }
                        my $item;
                        foreach my $i ( 0 .. $#v ) {
-                               my $v = $v[$i];
-                               # unpack numeric values separated by commas
-                               my $a = $v =~ m/\d+\s*,\s*\d+/ ? [ split(/\,\s*/,$v) ] : [ $v ];
-                               $item->{ $header[$i] || "f_$i" } = $a;
+                               $item->{ $header[$i] || "f_$i" } = [ $v[$i] ];
                        }
                        push @{ $data->{items} }, $item;
                }