is => 'ro', isa => 'Str', required => 1, default => 'LOLCAT'
);
-has 'translators' => (
+has '_translators' => (
is => 'ro', isa => 'HashRef', lazy_build => 1
);
-sub _build_translators {
+sub _build__translators {
my ($self) = @_;
- my $base = __PACKAGE__;
+ my $base = __PACKAGE__.'::Driver';
my $mp = Module::Pluggable::Object->new(
search_path => [ $base ]
);
sub translate_to {
my ($self, $target, $text) = @_;
- $self->translators->{$target}->translate($text);
+ $self->_translators->{$target}->translate($text);
}
__PACKAGE__->meta->make_immutable;