From d56815cae636d0e245922badb9e6cb8871abc715 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 30 Nov 2021 12:33:04 -0800 Subject: [PATCH] Hydra/Helper/CatalystUtils: default trim arg to empty string 12:34:12 hydra-server.1 | Use of uninitialized value $s in substitution (s///) at /home/vin/workspace/vcs/hydra/src/script/../lib/Hydra/Helper/CatalystUtils.pm line 283, <$fh> line 1. --- src/lib/Hydra/Helper/CatalystUtils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm index 0b48e455..64e3c44f 100644 --- a/src/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/lib/Hydra/Helper/CatalystUtils.pm @@ -279,7 +279,7 @@ sub requirePost { sub trim { - my $s = shift; + my $s = shift // ""; $s =~ s/^\s+|\s+$//g; return $s; }