From: Jason Stephenson Date: Tue, 25 Sep 2018 15:47:05 +0000 (-0400) Subject: LP#1793585: Fix Unescaped left brace in regex Perl error. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=47ddb4bf46cfbe1e3e823d9b42f2abe6715409aa;p=evergreen%2Fmasslnc.git LP#1793585: Fix Unescaped left brace in regex Perl error. Running make check results in the following error on Perl 5.26: Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE EMAIL_SENDER}/ at Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/HoldNotify.pm line 358. Prior to Ubuntu 18.04 and Perl 5.26, this was a deprecation warning. This commit fixes the regular expressions in HoldNotify.pm to escape the left braces to make this error/warning go away. Signed-off-by: Jason Stephenson Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/HoldNotify.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/HoldNotify.pm index a04245286b..b4559605e9 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/HoldNotify.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/HoldNotify.pm @@ -355,22 +355,22 @@ sub flesh_template { $sender = $bemail if $bemail; } - $str =~ s/\${EMAIL_SENDER}/$sender/; - $str =~ s/\${EMAIL_RECIPIENT}/$email/; - $str =~ s/\${EMAIL_REPLY_TO}/$reply_to/; - $str =~ s/\${EMAIL_HEADERS}//; - - $str =~ s/\${DATE}/$year-$month-$day/; - $str =~ s/\${LIBRARY}/$o_name/; - $str =~ s/\${LIBRARY_ADDRESS}/$o_addr/; - $str =~ s/\${PATRON_NAME}/$p_name/; - $str =~ s/\${PATRON_ADDRESS}/$p_addr/; - - $str =~ s/\${TITLE}/$title/; - $str =~ s/\${AUTHOR}/$author/; - $str =~ s/\${CALL_NUMBER}/$cn/; - $str =~ s/\${COPY_BARCODE}/$barcode/; - $str =~ s/\${COPY_NUMBER}/$copy_number/; + $str =~ s/\$\{EMAIL_SENDER}/$sender/; + $str =~ s/\$\{EMAIL_RECIPIENT}/$email/; + $str =~ s/\$\{EMAIL_REPLY_TO}/$reply_to/; + $str =~ s/\$\{EMAIL_HEADERS}//; + + $str =~ s/\$\{DATE}/$year-$month-$day/; + $str =~ s/\$\{LIBRARY}/$o_name/; + $str =~ s/\$\{LIBRARY_ADDRESS}/$o_addr/; + $str =~ s/\$\{PATRON_NAME}/$p_name/; + $str =~ s/\$\{PATRON_ADDRESS}/$p_addr/; + + $str =~ s/\$\{TITLE}/$title/; + $str =~ s/\$\{AUTHOR}/$author/; + $str =~ s/\$\{CALL_NUMBER}/$cn/; + $str =~ s/\$\{COPY_BARCODE}/$barcode/; + $str =~ s/\$\{COPY_NUMBER}/$copy_number/; return $str; }