package MyApp::Controller::SomeClass; use Moose; use namespace::autoclean; BEGIN { extends "Catalyst::Controller" } sub index :Path :Args(0) { my ( $self, $c ) = @_; my $pref = $c->user->search_related("prefs", {type => "soap"}); my $fss = $c->model("FSS"); my $stuff = $fss->call("fooBar", $fss->data->name("key")->value($pref->value)); die $stuff->faultstring if $stuff->fault; $c->stash( result => $stuff->result ); } __PACKAGE__->meta->make_immutable; 1;