diff --git a/Changes b/Changes index 59594f0..06dd4a1 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Revision history for Net::Etcd +0.023 +[ BUG FIX ] +* Fix a bug where the Bool type would fail under certain circumstances when setting keys => 1 for ttl. +While I could replicate, travis tests failed consistantly, we will resolve this better in the future. +Reference bless( do{\(my $o = 1)}, 'JSON::PP::Boolean' ) did not pass type constraint "Bool" (in $args->{"keys"}) + 0.022 [ ENHANCEMENTS ] * Improve support for prefix inline with etcd API. Fixes GH #53 Thanks Michael Fung! @@ -27,7 +33,7 @@ Revision history for Net::Etcd 0.018 [ ENHANCEMENTS ] * Added Member class and tests. -* Added ENV defaults for name 'ETCD_CLIENT_USERNAME', password 'ETCD_CLIENT_PASSWORD' and cacert 'ETCD_CERT_FILE' accessors. +* Added ENV defaults for name 'ETCD_CLIENT_USERNAME', password 'ETCD_CLIENT_PASSWORD' and cacert 'ETCD_CERT_FILE' accessors. * Updated TLS example. 0.017 @@ -49,7 +55,7 @@ Revision history for Net::Etcd 0.014 [ BUG FIX ] -* Resolved bug which prevented range delete transaction from completing. Closed via GH #25 Thanks Ananth Kavuri! +* Resolved bug which prevented range delete transaction from completing. Closed via GH #25 Thanks Ananth Kavuri! [ ANNOUNCEMENT ] * Added class Net::Etcd::KV::RangeDelete diff --git a/lib/Net/Etcd/Lease.pm b/lib/Net/Etcd/Lease.pm index 6894f17..591dbe3 100644 --- a/lib/Net/Etcd/Lease.pm +++ b/lib/Net/Etcd/Lease.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Moo; -use Types::Standard qw(Str Int Bool HashRef ArrayRef); +use Types::Standard qw(Str Int Any HashRef ArrayRef); use Data::Dumper; use Carp; use JSON; @@ -69,7 +69,7 @@ keys is true to query all the keys attached to this lease. has keys => ( is => 'ro', - isa => Bool, + isa => Any, coerce => sub { no strict 'refs'; return $_[0] ? JSON::true : JSON::false } ); diff --git a/lib/Net/Etcd/Role/Actions.pm b/lib/Net/Etcd/Role/Actions.pm index 40f1f98..4915850 100644 --- a/lib/Net/Etcd/Role/Actions.pm +++ b/lib/Net/Etcd/Role/Actions.pm @@ -43,7 +43,7 @@ sub _build_json_args { my ($self) = @_; my $args; for my $key ( keys %{$self} ) { - unless ( $key =~ /(?:etcd|cb|cv|hold|json_args|endpoint)$/ ) { + unless ( $key =~ /(?:retry_auth|etcd|cb|cv|hold|json_args|endpoint)$/ ) { $args->{$key} = $self->{$key}; } }