Use qr/ / for pre-compiliation of regex test
authorHeiko Schlittermann <hs@schlittermann.de>
Tue, 21 Jun 2016 16:14:56 +0200
branchtest
changeset 33 307dbb1d05a5
parent 32 d73a52cb6b5e
child 34 744983a36338
Use qr/ / for pre-compiliation of regex
lib/Nagios/Check/DNS/check_tlsa_record.pm
--- a/lib/Nagios/Check/DNS/check_tlsa_record.pm	Tue Jun 21 16:14:34 2016 +0200
+++ b/lib/Nagios/Check/DNS/check_tlsa_record.pm	Tue Jun 21 16:14:56 2016 +0200
@@ -14,8 +14,8 @@
 
 our $VERSION = '0.1';
 
-my $dane_pattern = '^(?<record>(?<tlsa_usage>\d+)\s+(?<tlsa_selector>\d+)\s+(?<tlsa_match_type>\d+)\s+(?<tlsa_hash>[0-9a-f ]+))$';
-my $with_cname   = '^(?<cname>[_a-z]+.*\n).*';
+my $dane_pattern = qr'^(?<record>(?<tlsa_usage>\d+)\s+(?<tlsa_selector>\d+)\s+(?<tlsa_match_type>\d+)\s+(?<tlsa_hash>[0-9a-f ]+))$';
+my $with_cname   = qr'^(?<cname>[_a-z]+.*\n).*';
 
 our $tmpfile = File::Temp->new();
 my $fdname = '/dev/fd/' . fileno $tmpfile;