my $session = AppSession->create('settings');
try {
$session->connect;
- } catch ERROR with {
+ } catch Error with {
my $e = shift;
$log->debug( "Remote subrequest returned an error:\n". $e );
return undef;
} finally {
return undef unless ($session->state == $session->CONNECTED);
- }
+ };
my $req = $session->request( 'opensrf.settings.xpath.get' );
my $list = $req->recv->content;
my $session = AppSession->create($class);
try {
$session->connect;
- } catch ERROR with {
+ } catch Error with {
my $e = shift;
$log->debug( "Remote subrequest returned an error:\n". $e );
return undef;
} finally {
return undef unless ($session->state == $session->CONNECTED);
- }
+ };
my $req = $session->request( 'opensrf.settings.xpath.get' );
}
if (!$self->{remote}) {
- my $code ||= \&{$app . '::' . $self->{method}};
+ my $code ||= \&{$server_class . '::' . $self->{method}};
$resp = $code->($self, $req, @_);
if ( ref($req) and UNIVERSAL::isa($req, 'OpenSRF::AppSubrequest') ) {
my $session = AppSession->create($self->{server_class});
try {
$session->connect;
- } catch ERROR with {
+ } catch Error with {
my $e = shift;
$log->debug( "Remote subrequest returned an error:\n". $e );
return undef;
} finally {
return undef unless ($session->state == $session->CONNECTED);
- }
+ };
my $remote_req = $session->request( $self->{api_name}, @_ );
while (my $remote_resp = $remote_req->recv) {