From d41d25e722eba612adf85393eff9c9ed09768082 Mon Sep 17 00:00:00 2001 From: David Golden Date: Sun, 30 Jun 2019 23:20:49 -0400 Subject: [PATCH] Rename implementation to private packages --- lib/MongoDBx/Queue.pm | 10 +++++----- .../Queue/Role/{CommonOptions.pm => _CommonOptions.pm} | 2 +- lib/MongoDBx/Queue/{V1.pm => _V1.pm} | 4 ++-- lib/MongoDBx/Queue/{V2.pm => _V2.pm} | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename lib/MongoDBx/Queue/Role/{CommonOptions.pm => _CommonOptions.pm} (90%) rename lib/MongoDBx/Queue/{V1.pm => _V1.pm} (97%) rename lib/MongoDBx/Queue/{V2.pm => _V2.pm} (97%) diff --git a/lib/MongoDBx/Queue.pm b/lib/MongoDBx/Queue.pm index b2cd44d..721281b 100644 --- a/lib/MongoDBx/Queue.pm +++ b/lib/MongoDBx/Queue.pm @@ -16,7 +16,7 @@ use MongoDB 2 (); use namespace::autoclean; with ( - 'MongoDBx::Queue::Role::CommonOptions', + 'MongoDBx::Queue::Role::_CommonOptions', ); #--------------------------------------------------------------------------# @@ -84,12 +84,12 @@ sub _build__implementation { collection_name => $self->collection_name, }; if ($self->version == 1) { - require MongoDBx::Queue::V1; - return MongoDBx::Queue::V1->new($options); + require MongoDBx::Queue::_V1; + return MongoDBx::Queue::_V1->new($options); } elsif ($self->version == 2) { - require MongoDBx::Queue::V2; - return MongoDBx::Queue::V2->new($options); + require MongoDBx::Queue::_V2; + return MongoDBx::Queue::_V2->new($options); } else { die "Invalid MongoDBx::Queue 'version' (must be 1 or 2)" diff --git a/lib/MongoDBx/Queue/Role/CommonOptions.pm b/lib/MongoDBx/Queue/Role/_CommonOptions.pm similarity index 90% rename from lib/MongoDBx/Queue/Role/CommonOptions.pm rename to lib/MongoDBx/Queue/Role/_CommonOptions.pm index cb98a9d..2bd6b61 100644 --- a/lib/MongoDBx/Queue/Role/CommonOptions.pm +++ b/lib/MongoDBx/Queue/Role/_CommonOptions.pm @@ -2,7 +2,7 @@ use 5.010; use strict; use warnings; -package MongoDBx::Queue::Role::CommonOptions; +package MongoDBx::Queue::Role::_CommonOptions; our $VERSION = '2.001'; diff --git a/lib/MongoDBx/Queue/V1.pm b/lib/MongoDBx/Queue/_V1.pm similarity index 97% rename from lib/MongoDBx/Queue/V1.pm rename to lib/MongoDBx/Queue/_V1.pm index dc54896..abc42f7 100644 --- a/lib/MongoDBx/Queue/V1.pm +++ b/lib/MongoDBx/Queue/_V1.pm @@ -2,7 +2,7 @@ use 5.010; use strict; use warnings; -package MongoDBx::Queue::V1; +package MongoDBx::Queue::_V1; # V1 implementation @@ -21,7 +21,7 @@ my $PRIORITY = '_p'; with ( 'MooseX::Role::Logger', 'MooseX::Role::MongoDB' => { -version => 1.000 }, - 'MongoDBx::Queue::Role::CommonOptions', + 'MongoDBx::Queue::Role::_CommonOptions', ); sub _build__mongo_default_database { $_[0]->database_name } diff --git a/lib/MongoDBx/Queue/V2.pm b/lib/MongoDBx/Queue/_V2.pm similarity index 97% rename from lib/MongoDBx/Queue/V2.pm rename to lib/MongoDBx/Queue/_V2.pm index d295749..28d7c58 100644 --- a/lib/MongoDBx/Queue/V2.pm +++ b/lib/MongoDBx/Queue/_V2.pm @@ -2,7 +2,7 @@ use 5.010; use strict; use warnings; -package MongoDBx::Queue::V2; +package MongoDBx::Queue::_V2; # V2 implementation @@ -22,7 +22,7 @@ my $PRIORITY = '_p'; with( 'MooseX::Role::Logger', 'MooseX::Role::MongoDB' => { -version => 1.000 }, - 'MongoDBx::Queue::Role::CommonOptions', + 'MongoDBx::Queue::Role::_CommonOptions', ); sub _build__mongo_default_database { $_[0]->database_name }