diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-07 22:39:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-07 22:39:03 +0100 |
commit | 4173d724a4e780cde281d8952f3468d403c19f2e (patch) | |
tree | d3b6cc2e430e25edf14f488a018aa24a7483e3bb | |
parent | 03b09f7ce06f25b5ccdbd685d8f25931dff41cc8 (diff) | |
parent | ff8aa20d0e42ca20184f67ec035d157c70ae7605 (diff) | |
download | monitoring-plugins-4173d724a4e780cde281d8952f3468d403c19f2e.tar.gz |
Merge pull request #2077 from RincewindsHat/eval_instead_try_tini
Just use eval instead of Try::Tiny in tests
-rw-r--r-- | NPTest.pm | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -17,8 +17,6 @@ use File::Basename; | |||
17 | 17 | ||
18 | use JSON; | 18 | use JSON; |
19 | 19 | ||
20 | use Try::Tiny; | ||
21 | |||
22 | use IO::File; | 20 | use IO::File; |
23 | use Data::Dumper; | 21 | use Data::Dumper; |
24 | 22 | ||
@@ -621,9 +619,7 @@ sub testCmd { | |||
621 | chomp $output; | 619 | chomp $output; |
622 | $object->output($output); | 620 | $object->output($output); |
623 | 621 | ||
624 | try { | 622 | eval { $object->{'mp_test_result'} = decode_json($output) }; |
625 | $object->{'mp_test_result'} = decode_json($output); | ||
626 | }; | ||
627 | 623 | ||
628 | alarm(0); | 624 | alarm(0); |
629 | 625 | ||