Skip to content

Instantly share code, notes, and snippets.

Created January 7, 2013 15:52
Show Gist options
  • Save anonymous/4476006 to your computer and use it in GitHub Desktop.
Save anonymous/4476006 to your computer and use it in GitHub Desktop.
sub foo {
my ( $self, $c, @args ) = @_;
$c->model('Bar')->do_something(
@args,
{ on_error => sub { $c->forward('error') },
on_sucess => sub { $c->forward('do_something') }
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment