Skip to content

Instantly share code, notes, and snippets.

@sharifulin
Created August 10, 2010 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharifulin/517102 to your computer and use it in GitHub Desktop.
Save sharifulin/517102 to your computer and use it in GitHub Desktop.
Mojolicious controller
package App:Foo;
use common::sense;
use App::User::Info;
use base 'App::Controller';
__PACKAGE__->attr(user => sub { App::User::Info->new(%{ +shift }) });
sub bar {
my $self = shift;
$self->user->...;
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment