diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-14 23:11:55 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-09-14 23:11:55 +0000 |
commit | 84a11c32e68a9a57378a5d38886f1cb2cb547393 (patch) | |
tree | 6685e371ae2fe6aaa83528e6d705e80c8304efad | |
parent | b90309f0267bdc9063fb5750f5a499d6504bd8a5 (diff) |
Adding n dimensional array support to DBObject::parse_array
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1602 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/DBObject.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index a0c6ba49..13e31230 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -252,6 +252,15 @@ sub _parse_array { $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/^\{([^,]*)(,|\})/\{/; |