diff --git a/Changes b/Changes index 0f855f3..02cb33c 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,8 @@ Revision history for Perl extension Foo. {{$NEXT}} + - Minor MySQL storage fixup + 0.10 2012-05-08 09:43:54 Europe/Berlin - MySQL storage: more documentation and minor diff --git a/dist.ini b/dist.ini index d2be162..982d210 100644 --- a/dist.ini +++ b/dist.ini @@ -1,5 +1,5 @@ name = ShardedKV -version = 0.10 +version = 0.11 author = Steffen Mueller author = Nick Perez license = Perl_5 diff --git a/lib/ShardedKV/Storage/MySQL.pm b/lib/ShardedKV/Storage/MySQL.pm index 39b6705..cffca1d 100644 --- a/lib/ShardedKV/Storage/MySQL.pm +++ b/lib/ShardedKV/Storage/MySQL.pm @@ -217,11 +217,16 @@ has '_number_of_params' => ( builder => '_calc_no_params', ); +sub BUILD { + $_[0]->_number_of_params; +}; + sub _calc_no_params { my $self = shift; return 1 + scalar(@{$self->value_col_names}); } + sub _make_get_query { my $self = shift; $self->_number_of_params; # prepopulate