[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1602] trunk/LedgerSMB/DBObject.pm



Revision: 1602
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1602&view=rev
Author:   einhverfr
Date:     2007-09-14 16:11:55 -0700 (Fri, 14 Sep 2007)

Log Message:
-----------
Adding n dimensional array support to DBObject::parse_array

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject.pm

Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm	2007-09-14 22:59:13 UTC (rev 1601)
+++ trunk/LedgerSMB/DBObject.pm	2007-09-14 23:11:55 UTC (rev 1602)
@@ -252,6 +252,15 @@
                 $separator = $1;
             }
             $next =~ s/"(.*)"$separator$/$1/;
+
+        } elsif ($value =~ /^{({+})/){
+            my $open_braces = $1;
+            my $close_braces = $open_braces;
+            $close_braces =~ s/{/}/g;
+            $value =~ /^{($open_braces.*$close_braces)/;
+            $next = $1;
+            $value =~ s/^{$next/{/;
+            $next = $self->parse_array($next);
             
         } else {
             $value =~ s/^\{([^,]*)(,|\})/\{/;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.