incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul \"LeoNerd\" Evans" <leon...@leonerd.org.uk>
Subject Re: List support in Net::Async::CassandraCQL ?
Date Thu, 06 Mar 2014 19:06:00 GMT
On Sun, 23 Feb 2014 13:06:54 +1100
Jacob Rhoden <jacob.rhoden@me.com> wrote:

> Thanks! I did try this without success. Perhaps I am just making a
> simple perl mistake then? I’ve been doing java so long, my perl is a
> little rusty:
> 
>         my @address = ();
>         if(defined $a1 && $a1 ne "") {
>             push @address, $a1;
>         }
>         if(defined $a2 && $a2 ne "") {
>             push @address, $a2;
>         }
>         if(defined $a3 && $a3 ne "") {
>             push @address, $a3;
>         }
> 
>         my @f;
>         my $q = $cass->prepare("update contact set name=?, address=? where uuid=?")->get;
>         push @f, $q->execute([$name, \@address, $uuid]);
>         Future->needs_all( @f )->get;

First of all, quite aside from the actual error, your use of
Future->needs_all on a list of a single future is totally redundant
there. You can replace that with simply

  $q->execute(...)->get;

Secondly, it's a little hard for me to reproduce this one locally
without seeing the table definition. Could you supply the CQL
definition used to create the table as well, so I can try it out for
myself?

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
http://www.leonerd.org.uk/  |  https://metacpan.org/author/PEVANS

Mime
View raw message