From de53a0eaa2de521cb88fb796a1b75f0e072e22fb Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Tue, 27 Dec 2011 21:40:57 -0800 Subject: [PATCH] Speed up diag.t slightly By using strings instead of creating qr// things that get flattened, we can reduce the run time by 5%. --- t/porting/diag.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/porting/diag.t b/t/porting/diag.t index e9456c7..ff0e3b2 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -50,8 +50,8 @@ while (<$func_fh>) { close $func_fh; my $function_re = join '|', @functions; -my $source_msg_re = qr/(?\bDIE\b|$function_re)/; -my $text_re = qr/"(?(?:\\"|[^"]|"\s*[A-Z_]+\s*")*)"/; +my $source_msg_re = '(?\bDIE\b|$function_re)'; +my $text_re = '"(?(?:\\\\"|[^"]|"\s*[A-Z_]+\s*")*)"'; my $source_msg_call_re = qr/$source_msg_re(?:_nocontext)? \s* \(aTHX_ \s* (?:packWARN\d*\((?.*?)\),)? \s* -- 2.7.4