From ba0822138bd512bdf41a51066e744508d13362fc Mon Sep 17 00:00:00 2001
From: Yuriy Nevinitsin <nevinitsin@corp.mail.ru>
Date: Tue, 15 May 2012 12:08:16 +0400
Subject: [PATCH] [connector][perl] fix da fix

---
 connector/perl/lib/MR/Tarantool/Box.pm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/connector/perl/lib/MR/Tarantool/Box.pm b/connector/perl/lib/MR/Tarantool/Box.pm
index 05aeded69d..905c92d080 100644
--- a/connector/perl/lib/MR/Tarantool/Box.pm
+++ b/connector/perl/lib/MR/Tarantool/Box.pm
@@ -572,13 +572,15 @@ sub Call {
     confess "All fields must be defined" if grep { !defined } @$tuple;
 
     confess "Required `unpack_format` option wasn't defined"
-        unless exists $param->{unpack_format} and $param->{unpack_format};
+        unless exists $param->{unpack} or exists $param->{unpack_format} and $param->{unpack_format};
 
     my $unpack_format = $param->{unpack_format};
-    $unpack_format = [ split /\s*/, $unpack_format ]
-        unless 'ARRAY' eq ref $unpack_format;
+    if($unpack_format) {
+        $unpack_format = [ split /\s*/, $unpack_format ]
+            unless 'ARRAY' eq ref $unpack_format;
 
-    $unpack_format = join '', map { /&/ ? 'w/a*' : "x$_" } @$unpack_format;
+        $unpack_format = join '', map { /&/ ? 'w/a*' : "x$_" } @$unpack_format;
+    }
 
     local $namespace->{unpack_format} = $unpack_format if $unpack_format; # XXX
     local $namespace->{append_for_unpack} = ''         if $unpack_format; # shit...
-- 
GitLab