Hi all,

I made one-file Mojolicious app (*test.pl*) to test 
Mojolicious::Plugin::I18N, but test fails.

package main;
use Mojo::Base -strict;
use Test::More;
use Test::Mojo;


{
    package MyApp::Controller::Test;
    use Mojo::Base 'Mojolicious::Controller';
    sub info {
      my $self = shift;
      $self->render(json => { msg => $self->l('hello')} );
    }

   package MyApp::I18N::ru;
   use Mojo::Base 'MyApp::I18N';
   our %Lexicon = (hello => 'Privet');
   1;

   package MyApp;
   use Mojo::Base 'Mojolicious';
   sub startup {
     my $self = shift;
     $self->plugin('I18N');
     $self->routes->get('/info')->to('test#info');
   }

}

my $app = MyApp::->new();
my $t = Test::Mojo->new($app);
$t->get_ok('/info/ru')->status_is(200)->json_is({msg => 'hallo'});
done_testing;

error that I got:

perl test.pl 
> Can't locate MyApp/I18N.pm in @INC (you may need to install the 
> MyApp::I18N module)


What can be wrong? 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to