Evan Carroll
Evan Carroll

Reputation: 1

Mojo: Class "Foo::Controller::OAuth" is not a controller

For some reason I get this message in my log,

Class "Foo::Controller::OAuth" is not a controller

However, in my Foo::Controller::OAuth I have at the very top,

use Mojo::Base 'Mojolicious::Controller';

What other things can cause this error?

Upvotes: 1

Views: 136

Answers (1)

Evan Carroll
Evan Carroll

Reputation: 1

You can get this error if the package name is wrong. For example

package Foo::Controller::Oauth; # notice the lower-case a in 'auth'
use Mojo::Base 'Mojolicious::Controller';

vs

package Foo::Controller::Oauth; # notice the upper-case A in 'Auth'
use Mojo::Base 'Mojolicious::Controller';

Upvotes: 1

Related Questions