Skip to content

Commit

Permalink
Rename implementation to private packages
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg committed Jul 1, 2019
1 parent f7d54f1 commit d41d25e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/MongoDBx/Queue.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use MongoDB 2 ();
use namespace::autoclean;

with (
'MongoDBx::Queue::Role::CommonOptions',
'MongoDBx::Queue::Role::_CommonOptions',
);

#--------------------------------------------------------------------------#
Expand Down Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
4 changes: 2 additions & 2 deletions lib/MongoDBx/Queue/V1.pm → lib/MongoDBx/Queue/_V1.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use 5.010;
use strict;
use warnings;

package MongoDBx::Queue::V1;
package MongoDBx::Queue::_V1;

# V1 implementation

Expand All @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions lib/MongoDBx/Queue/V2.pm → lib/MongoDBx/Queue/_V2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use 5.010;
use strict;
use warnings;

package MongoDBx::Queue::V2;
package MongoDBx::Queue::_V2;

# V2 implementation

Expand All @@ -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 }
Expand Down

0 comments on commit d41d25e

Please sign in to comment.