hook external translator model back up to the app
Matt S Trout [Fri, 6 Feb 2009 17:01:33 +0000 (17:01 +0000)]
lib/LolCatalyst/Lite/Model/Translator.pm

index f66a690..3b9ee73 100644 (file)
@@ -2,15 +2,11 @@ package LolCatalyst::Lite::Model::Translator;
 
 use strict;
 use warnings;
-use parent 'Catalyst::Model';
+use parent 'Catalyst::Model::Adaptor';
 
-use Acme::LOLCAT ();
-use Memoize;
-memoize ('translate');
-
-sub translate {
-    my ($self, $text) = @_;
-    return Acme::LOLCAT::translate($text);
-}
+__PACKAGE__->config(
+  class => 'LolCatalyst::Lite::Translator',
+  args => {},
+);
 
 1;