diff --git a/Changes b/Changes index d9add3f..1f78d30 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,4 @@ -Revision history for Etcd3 +Revision history for Net::Etcd 0.007 [ ANNOUNCEMENT ] @@ -9,9 +9,9 @@ Revision history for Etcd3 * Sweeping changes to usage some not backwards compatible, sorry. * Restructuring of classes to consolidate and reduce redundancy, see d323feb5c0. * Replaced HTTP::Tiny with AnyEvent::HTTP allowing async interaction with etcd. - * Simplified the internal way $etcd object is initialized. Replacing ->connect with ->new, also moving ::Client into Etcd3 module. + * Simplified the internal way $etcd object is initialized. Replacing ->connect with ->new, also moving ::Client into Net::Etcd module. * Renamed _client accessor to etcd. - * Make Etcd3::KV a Moo::Role allowing easier interaction with other KV classes. + * Make Net::Etcd::KV a Moo::Role allowing easier interaction with other KV classes. [ BUG FIXES ] diff --git a/MANIFEST b/MANIFEST index d171093..a27acd4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4,18 +4,18 @@ MANIFEST.SKIP Makefile.PL README README.md -lib/Etcd3.pm -lib/Etcd3/Auth.pm -lib/Etcd3/Auth/Role.pm -lib/Etcd3/Config.pm -lib/Etcd3/Lease.pm -lib/Etcd3/Role/Actions.pm -lib/Etcd3/KV.pm -lib/Etcd3/KV/Put.pm -lib/Etcd3/KV/Range.pm -lib/Etcd3/User.pm -lib/Etcd3/User/Role.pm -lib/Etcd3/Watch.pm +lib/Net::Etcd.pm +lib/Net::Etcd/Auth.pm +lib/Net::Etcd/Auth/Role.pm +lib/Net::Etcd/Config.pm +lib/Net::Etcd/Lease.pm +lib/Net::Etcd/Role/Actions.pm +lib/Net::Etcd/KV.pm +lib/Net::Etcd/KV/Put.pm +lib/Net::Etcd/KV/Range.pm +lib/Net::Etcd/User.pm +lib/Net::Etcd/User/Role.pm +lib/Net::Etcd/Watch.pm t/00-load.t t/key_value.t t/lease.t diff --git a/Makefile.PL b/Makefile.PL index 5617718..4e57434 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,9 +4,9 @@ use warnings FATAL => 'all'; use ExtUtils::MakeMaker; WriteMakefile( - NAME => 'Etcd3', + NAME => 'Net::Etcd', AUTHOR => q{Sam Batschelet (hexfusion) }, - VERSION_FROM => 'lib/Etcd3.pm', + VERSION_FROM => 'lib/Net::Etcd.pm', ABSTRACT => 'Provide access to the etcd v3 API.', LICENSE => 'perl', PL_FILES => {}, @@ -35,9 +35,9 @@ WriteMakefile( META_MERGE => { resources => { repository => - 'https://github.com/hexfusion/Etcd3', + 'https://github.com/hexfusion/Net::Etcd', bugtracker => - 'https://github.com/hexfusion/Etcd3', + 'https://github.com/hexfusion/Net::Etcd', }, }, ); diff --git a/README b/README index b969fde..b8b5484 100644 --- a/README +++ b/README @@ -1,12 +1,12 @@ NAME - Etcd3 + Net::Etcd SYNOPSIS Etcd v3.1.0 or greater is required. To use the v3 API make sure to set environment variable ETCDCTL_API=3. Precompiled binaries can be downloaded at https://github.com/coreos/etcd/releases. - $etcd = Etcd3->new(); # host: 127.0.0.1 port: 2379 - $etcd = Etcd3->new({ host => $host, port => $port, ssl => 1 }); + $etcd = Net::Etcd->new(); # host: 127.0.0.1 port: 2379 + $etcd = Net::Etcd->new({ host => $host, port => $port, ssl => 1 }); # put key $result = $etcd->put({ key =>'foo1', value => 'bar' }); @@ -36,7 +36,7 @@ SYNOPSIS $etcd->put( { key => 'foo2', value => 'bar2', lease => 7587821338341002662 } ); DESCRIPTION - "Etcd3" An object oriented interface to the v3 REST API provided by the + "Net::Etcd" An object oriented interface to the v3 REST API provided by the etcd grpc gateway. ACCESSORS @@ -54,17 +54,17 @@ ACCESSORS auth_token PUBLIC METHODS watch - Returns a Etcd3::Watch object. + Returns a Net::Etcd::Watch object. $etcd->watch({ key =>'foo', range_end => 'fop' }) role - Returns a Etcd3::Auth::Role object. + Returns a Net::Etcd::Auth::Role object. $etcd->role({ role => 'foo' }); user_role - Returns a Etcd3::User::Role object. + Returns a Net::Etcd::User::Role object. $etcd->user_role({ name => 'samba', role => 'foo' }); @@ -72,16 +72,16 @@ PUBLIC METHODS Currently not available. lease - Returns a Etcd3::Lease object. + Returns a Net::Etcd::Lease object. user - Returns a Etcd3::User object. + Returns a Net::Etcd::User object. put - Returns a Etcd3::KV::Put object. + Returns a Net::Etcd::KV::Put object. range - Returns a Etcd3::KV::Range object. + Returns a Net::Etcd::KV::Range object. configuration Initialize configuration checks to see it etcd is installed locally. diff --git a/README.md b/README.md index 7e33ca5..27d586b 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,15 @@ # NAME -Etcd3 +Net::Etcd # SYNOPSIS Etcd v3.1.0 or greater is required. To use the v3 API make sure to set environment variable ETCDCTL_API=3. Precompiled binaries can be downloaded at https://github.com/coreos/etcd/releases. - $etcd = Etcd3->new(); # host: 127.0.0.1 port: 2379 - $etcd = Etcd3->new({ host => $host, port => $port, ssl => 1 }); + $etcd = Net::Etcd->new(); # host: 127.0.0.1 port: 2379 + $etcd = Net::Etcd->new({ host => $host, port => $port, ssl => 1 }); # put key $result = $etcd->put({ key =>'foo1', value => 'bar' }); @@ -41,7 +41,7 @@ Etcd3 # DESCRIPTION -`Etcd3` An object oriented interface to the v3 REST API provided by the etcd grpc gateway. +`Net::Etcd` An object oriented interface to the v3 REST API provided by the etcd grpc gateway. # ACCESSORS @@ -71,19 +71,19 @@ defaults to /v3alpha ## watch -Returns a [Etcd3::Watch](https://metacpan.org/pod/Etcd3::Watch) object. +Returns a [Net::Etcd::Watch](https://metacpan.org/pod/Net::Etcd::Watch) object. $etcd->watch({ key =>'foo', range_end => 'fop' }) ## role -Returns a [Etcd3::Auth::Role](https://metacpan.org/pod/Etcd3::Auth::Role) object. +Returns a [Net::Etcd::Auth::Role](https://metacpan.org/pod/Net::Etcd::Auth::Role) object. $etcd->role({ role => 'foo' }); ## user\_role -Returns a [Etcd3::User::Role](https://metacpan.org/pod/Etcd3::User::Role) object. +Returns a [Net::Etcd::User::Role](https://metacpan.org/pod/Net::Etcd::User::Role) object. $etcd->user_role({ name => 'samba', role => 'foo' }); @@ -93,19 +93,19 @@ Currently not available. ## lease -Returns a [Etcd3::Lease](https://metacpan.org/pod/Etcd3::Lease) object. +Returns a [Net::Etcd::Lease](https://metacpan.org/pod/Net::Etcd::Lease) object. ## user -Returns a [Etcd3::User](https://metacpan.org/pod/Etcd3::User) object. +Returns a [Net::Etcd::User](https://metacpan.org/pod/Net::Etcd::User) object. ## put -Returns a [Etcd3::KV::Put](https://metacpan.org/pod/Etcd3::KV::Put) object. +Returns a [Net::Etcd::KV::Put](https://metacpan.org/pod/Net::Etcd::KV::Put) object. ## range -Returns a [Etcd3::KV::Range](https://metacpan.org/pod/Etcd3::KV::Range) object. +Returns a [Net::Etcd::KV::Range](https://metacpan.org/pod/Net::Etcd::KV::Range) object. ## configuration diff --git a/lib/Etcd3.pm b/lib/Net/Etcd.pm similarity index 84% rename from lib/Etcd3.pm rename to lib/Net/Etcd.pm index cb74605..628d974 100644 --- a/lib/Etcd3.pm +++ b/lib/Net/Etcd.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3; +package Net::Etcd; # ABSTRACT: [depricated] Please see Net::Etcd. use strict; @@ -8,14 +8,14 @@ use warnings; use Moo; use JSON; use MIME::Base64; -use Etcd3::Auth; -use Etcd3::Config; -use Etcd3::Watch; -use Etcd3::Lease; -use Etcd3::User; +use Net::Etcd::Auth; +use Net::Etcd::Config; +use Net::Etcd::Watch; +use Net::Etcd::Lease; +use Net::Etcd::User; use Types::Standard qw(Str Int Bool HashRef); -with('Etcd3::KV'); +with('Net::Etcd::KV'); use namespace::clean; @@ -23,7 +23,7 @@ use namespace::clean; =head1 NAME -Etcd3 +Net::Etcd =cut @@ -34,8 +34,8 @@ our $VERSION = '0.007'; Etcd v3.1.0 or greater is required. To use the v3 API make sure to set environment variable ETCDCTL_API=3. Precompiled binaries can be downloaded at https://github.com/coreos/etcd/releases. - $etcd = Etcd3->new(); # host: 127.0.0.1 port: 2379 - $etcd = Etcd3->new({ host => $host, port => $port, ssl => 1 }); + $etcd = Net::Etcd->new(); # host: 127.0.0.1 port: 2379 + $etcd = Net::Etcd->new({ host => $host, port => $port, ssl => 1 }); # put key $result = $etcd->put({ key =>'foo1', value => 'bar' }); @@ -163,7 +163,7 @@ has auth_token => ( is => 'lazy' ); sub _build_auth_token { my ($self) = @_; - return Etcd3::Auth::Authenticate->new( + return Net::Etcd::Auth::Authenticate->new( etcd => $self, %$self )->token; @@ -173,7 +173,7 @@ sub _build_auth_token { =head2 watch -Returns a L object. +Returns a L object. $etcd->watch({ key =>'foo', range_end => 'fop' }) @@ -182,7 +182,7 @@ Returns a L object. sub watch { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - return Etcd3::Watch->new( + return Net::Etcd::Watch->new( etcd => $self, cb => $cb, ( $options ? %$options : () ), @@ -191,7 +191,7 @@ sub watch { =head2 role -Returns a L object. +Returns a L object. $etcd->role({ role => 'foo' }); @@ -200,7 +200,7 @@ Returns a L object. sub role { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - return Etcd3::Auth::Role->new( + return Net::Etcd::Auth::Role->new( etcd => $self, cb => $cb, ( $options ? %$options : () ), @@ -209,7 +209,7 @@ sub role { =head2 user_role -Returns a L object. +Returns a L object. $etcd->user_role({ name => 'samba', role => 'foo' }); @@ -218,7 +218,7 @@ Returns a L object. sub user_role { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - return Etcd3::User::Role->new( + return Net::Etcd::User::Role->new( etcd => $self, cb => $cb, ( $options ? %$options : () ), @@ -227,14 +227,14 @@ sub user_role { =head2 auth -Returns a L object. +Returns a L object. =cut sub auth { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - return Etcd3::Auth->new( + return Net::Etcd::Auth->new( etcd => $self, cb => $cb, ( $options ? %$options : () ), @@ -243,14 +243,14 @@ sub auth { =head2 lease -Returns a L object. +Returns a L object. =cut sub lease { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - return Etcd3::Lease->new( + return Net::Etcd::Lease->new( etcd => $self, cb => $cb, ( $options ? %$options : () ), @@ -259,14 +259,14 @@ sub lease { =head2 user -Returns a L object. +Returns a L object. =cut sub user { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - return Etcd3::User->new( + return Net::Etcd::User->new( etcd => $self, cb => $cb, ( $options ? %$options : () ), @@ -275,13 +275,13 @@ sub user { =head2 put -Returns a L object. +Returns a L object. =cut =head2 range -Returns a L object. +Returns a L object. =cut @@ -292,7 +292,7 @@ Initialize configuration checks to see it etcd is installed locally. =cut sub configuration { - Etcd3::Config->configuration; + Net::Etcd::Config->configuration; } sub BUILD { diff --git a/lib/Etcd3/Auth.pm b/lib/Net/Etcd/Auth.pm similarity index 94% rename from lib/Etcd3/Auth.pm rename to lib/Net/Etcd/Auth.pm index e652a64..3832dad 100644 --- a/lib/Etcd3/Auth.pm +++ b/lib/Net/Etcd/Auth.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::Auth; +package Net::Etcd::Auth; use strict; use warnings; @@ -11,16 +11,16 @@ use warnings; use Moo; use Carp; use Types::Standard qw(Str Int Bool HashRef ArrayRef); -use Etcd3::Auth::Role; +use Net::Etcd::Auth::Role; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::Auth +Net::Etcd::Auth =cut diff --git a/lib/Etcd3/Auth/Role.pm b/lib/Net/Etcd/Auth/Role.pm similarity index 94% rename from lib/Etcd3/Auth/Role.pm rename to lib/Net/Etcd/Auth/Role.pm index bedfba1..d9f0482 100644 --- a/lib/Etcd3/Auth/Role.pm +++ b/lib/Net/Etcd/Auth/Role.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::Auth::Role; +package Net::Etcd::Auth::Role; use strict; use warnings; @@ -10,13 +10,13 @@ use MIME::Base64; use Carp; use JSON; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::Auth::Role +Net::Etcd::Auth::Role =cut diff --git a/lib/Etcd3/Config.pm b/lib/Net/Etcd/Config.pm similarity index 87% rename from lib/Etcd3/Config.pm rename to lib/Net/Etcd/Config.pm index 5a601ed..d0b2582 100644 --- a/lib/Etcd3/Config.pm +++ b/lib/Net/Etcd/Config.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::Config; +package Net::Etcd::Config; use strict; use warnings; @@ -9,7 +9,7 @@ use namespace::clean; =head1 NAME -Etcd3::Config +Net::Etcd::Config =cut @@ -38,7 +38,7 @@ sub _build_etcd { =cut sub configuration { - return Etcd3::Config->new; + return Net::Etcd::Config->new; } =head2 configure diff --git a/lib/Etcd3/KV.pm b/lib/Net/Etcd/KV.pm similarity index 85% rename from lib/Etcd3/KV.pm rename to lib/Net/Etcd/KV.pm index 79c85ab..6ec271a 100644 --- a/lib/Etcd3/KV.pm +++ b/lib/Net/Etcd/KV.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::KV; +package Net::Etcd::KV; use strict; use warnings; @@ -9,15 +9,15 @@ use warnings; =cut use Moo::Role; use Types::Standard qw(Str Int Bool HashRef ArrayRef); -use Etcd3::KV::Put; -use Etcd3::KV::Range; +use Net::Etcd::KV::Put; +use Net::Etcd::KV::Range; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::KV +Net::Etcd::KV =cut @@ -42,7 +42,7 @@ Range gets the keys in the range from the key-value store. sub range { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - my $range = Etcd3::KV::Range->new( + my $range = Net::Etcd::KV::Range->new( %$self, endpoint => '/kv/range', etcd => $self, @@ -66,7 +66,7 @@ history. sub put { my ( $self, $options ) = @_; my $cb = pop if ref $_[-1] eq 'CODE'; - my $range = Etcd3::KV::Put->new( + my $range = Net::Etcd::KV::Put->new( %$self, endpoint => '/kv/put', etcd => $self, diff --git a/lib/Etcd3/KV/Put.pm b/lib/Net/Etcd/KV/Put.pm similarity index 95% rename from lib/Etcd3/KV/Put.pm rename to lib/Net/Etcd/KV/Put.pm index b3bfe6b..275f708 100644 --- a/lib/Etcd3/KV/Put.pm +++ b/lib/Net/Etcd/KV/Put.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::KV::Put; +package Net::Etcd::KV::Put; use strict; use warnings; @@ -9,13 +9,13 @@ use Types::Standard qw(Str Int Bool HashRef ArrayRef); use MIME::Base64; use JSON; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::Put +Net::Etcd::Put =cut diff --git a/lib/Etcd3/KV/Range.pm b/lib/Net/Etcd/KV/Range.pm similarity index 97% rename from lib/Etcd3/KV/Range.pm rename to lib/Net/Etcd/KV/Range.pm index 84ed195..623c52d 100644 --- a/lib/Etcd3/KV/Range.pm +++ b/lib/Net/Etcd/KV/Range.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::KV::Range; +package Net::Etcd::KV::Range; use strict; use warnings; @@ -9,14 +9,14 @@ use Types::Standard qw(Str Int Bool HashRef ArrayRef); use MIME::Base64; use JSON; -with 'Etcd3::Role::Actions'; -#extends 'Etcd3::KV'; +with 'Net::Etcd::Role::Actions'; +#extends 'Net::Etcd::KV'; use namespace::clean; =head1 NAME -Etcd3::Range +Net::Etcd::Range =cut diff --git a/lib/Etcd3/Lease.pm b/lib/Net/Etcd/Lease.pm similarity index 97% rename from lib/Etcd3/Lease.pm rename to lib/Net/Etcd/Lease.pm index f65712d..6a4bf35 100644 --- a/lib/Etcd3/Lease.pm +++ b/lib/Net/Etcd/Lease.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::Lease; +package Net::Etcd::Lease; use strict; use warnings; @@ -10,13 +10,13 @@ use Data::Dumper; use Carp; use JSON; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::Lease +Net::Etcd::Lease =cut diff --git a/lib/Etcd3/Role/Actions.pm b/lib/Net/Etcd/Role/Actions.pm similarity index 96% rename from lib/Etcd3/Role/Actions.pm rename to lib/Net/Etcd/Role/Actions.pm index fdc1314..d484dd1 100644 --- a/lib/Etcd3/Role/Actions.pm +++ b/lib/Net/Etcd/Role/Actions.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::Role::Actions; +package Net::Etcd::Role::Actions; use strict; use warnings; @@ -18,7 +18,7 @@ use namespace::clean; =head1 NAME -Etcd3::Role::Actions +Net::Etcd::Role::Actions =cut @@ -26,7 +26,7 @@ our $VERSION = '0.007'; has etcd => ( is => 'ro', - isa => InstanceOf ['Etcd3'], + isa => InstanceOf ['Net::Etcd'], ); =head2 json_args diff --git a/lib/Etcd3/User.pm b/lib/Net/Etcd/User.pm similarity index 91% rename from lib/Etcd3/User.pm rename to lib/Net/Etcd/User.pm index 6f64ea1..58a422b 100644 --- a/lib/Etcd3/User.pm +++ b/lib/Net/Etcd/User.pm @@ -1,22 +1,22 @@ use utf8; -package Etcd3::User; +package Net::Etcd::User; use strict; use warnings; use Moo; use Carp; -use Etcd3::User::Role; +use Net::Etcd::User::Role; use Types::Standard qw(Str Int Bool HashRef ArrayRef); use Data::Dumper; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::User +Net::Etcd::User =cut diff --git a/lib/Etcd3/User/Role.pm b/lib/Net/Etcd/User/Role.pm similarity index 91% rename from lib/Etcd3/User/Role.pm rename to lib/Net/Etcd/User/Role.pm index 63fdc4a..c636db1 100644 --- a/lib/Etcd3/User/Role.pm +++ b/lib/Net/Etcd/User/Role.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::User::Role; +package Net::Etcd::User::Role; use strict; use warnings; @@ -7,13 +7,13 @@ use warnings; use Moo; use Types::Standard qw(Str Int Bool HashRef ArrayRef); -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::User::Role +Net::Etcd::User::Role =cut diff --git a/lib/Etcd3/Watch.pm b/lib/Net/Etcd/Watch.pm similarity index 97% rename from lib/Etcd3/Watch.pm rename to lib/Net/Etcd/Watch.pm index d18fcd7..a2afa28 100644 --- a/lib/Etcd3/Watch.pm +++ b/lib/Net/Etcd/Watch.pm @@ -1,5 +1,5 @@ use utf8; -package Etcd3::Watch; +package Net::Etcd::Watch; use strict; use warnings; @@ -10,13 +10,13 @@ use MIME::Base64; use Data::Dumper; use JSON; -with 'Etcd3::Role::Actions'; +with 'Net::Etcd::Role::Actions'; use namespace::clean; =head1 NAME -Etcd3::Range +Net::Etcd::Range =cut diff --git a/t/00-load.t b/t/00-load.t index 125725e..1055cfb 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -4,8 +4,8 @@ use Test::More tests => 1; BEGIN { $ENV{PATH} = '/bin:/usr/bin'; - use_ok( 'Etcd3' ) || print "Bail out! + use_ok( 'Net::Etcd' ) || print "Bail out! "; } -diag( "Testing Etcd3 $Etcd3::VERSION, Perl $], $^X" ); +diag( "Testing Net::Etcd $Net::Etcd::VERSION, Perl $], $^X" ); diff --git a/t/key_value.t b/t/key_value.t index 6841f08..36805ca 100644 --- a/t/key_value.t +++ b/t/key_value.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Etcd3; +use Net::Etcd; use Test::More; use Test::Exception; use Data::Dumper; @@ -18,7 +18,7 @@ else { plan skip_all => "Please set environment variable ETCD_TEST_HOST and ETCD_TEST_PORT."; } -my $etcd = Etcd3->new( { host => $host, port => $port } ); +my $etcd = Net::Etcd->new( { host => $host, port => $port } ); my $key; diff --git a/t/lease.t b/t/lease.t index e62e73c..1c8acb7 100644 --- a/t/lease.t +++ b/t/lease.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Etcd3; +use Net::Etcd; use Test::More; use Test::Exception; use Data::Dumper; @@ -19,7 +19,7 @@ else { plan skip_all => "Please set environment variable ETCD_TEST_HOST and ETCD_TEST_PORT."; } -my $etcd = Etcd3->new( { host => $host, port => $port } ); +my $etcd = Net::Etcd->new( { host => $host, port => $port } ); my $lease; diff --git a/t/user.t b/t/user.t index 7abc9de..295dcf5 100644 --- a/t/user.t +++ b/t/user.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Etcd3; +use Net::Etcd; use Test::More; use Test::Exception; use Data::Dumper; @@ -20,7 +20,7 @@ else { plan skip_all => "Please set environment variable ETCD_TEST_HOST and ETCD_TEST_PORT."; } -my $etcd = Etcd3->new( { host => $host, port => $port } ); +my $etcd = Net::Etcd->new( { host => $host, port => $port } ); my ($user, $role); diff --git a/t/watch.t b/t/watch.t index 0de4202..fcc0adf 100644 --- a/t/watch.t +++ b/t/watch.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Etcd3; +use Net::Etcd; use Test::More; use Test::Exception; use Data::Dumper; @@ -18,7 +18,7 @@ else { } my ($watch,$key); -my $etcd = Etcd3->new( { host => $host, port => $port } ); +my $etcd = Net::Etcd->new( { host => $host, port => $port } ); our @events; # create watch with callback and store events