Skip to content

Commit aeca483

Browse files
committed
Refactor openqa-load-templates script with Feature::Compat::Try
https://progress.opensuse.org/issues/176862
1 parent e6346e1 commit aeca483

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script/openqa-load-templates

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use Mojo::Base -strict, -signatures;
5454
use FindBin;
5555
use lib "$FindBin::RealBin/../lib";
5656
use File::Basename qw(dirname);
57-
use Try::Tiny;
57+
use Feature::Compat::Try;
5858
use Data::Dump 'dd';
5959
use Mojo::Util qw(decamelize);
6060
use Mojo::URL;
@@ -86,10 +86,10 @@ try {
8686
$info = Cpanel::JSON::XS->new->relaxed->decode($datafile);
8787
dd $info;
8888
}
89-
catch {
89+
catch ($e) {
9090
$info = eval $datafile;
9191
if (my $error = $@) { die "Error in data file: $error\n" }
92-
};
92+
}
9393

9494
$options{'host'} ||= 'localhost';
9595
$options{apibase} ||= '/api/v1';

0 commit comments

Comments
 (0)