summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-27 21:40:57 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-28 22:58:53 -0800
commitde53a0eaa2de521cb88fb796a1b75f0e072e22fb (patch)
tree31300e8c7146bb611bbce15b332132bca0a1aa00 /t
parent054235ee45cc2dc80ad1fea405144ec1e3022115 (diff)
downloadperl-de53a0eaa2de521cb88fb796a1b75f0e072e22fb.tar.gz
Speed up diag.t slightly
By using strings instead of creating qr// things that get flattened, we can reduce the run time by 5%.
Diffstat (limited to 't')
-rw-r--r--t/porting/diag.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/porting/diag.t b/t/porting/diag.t
index e9456c70c2..ff0e3b2a0f 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/(?<routine>\bDIE\b|$function_re)/;
-my $text_re = qr/"(?<text>(?:\\"|[^"]|"\s*[A-Z_]+\s*")*)"/;
+my $source_msg_re = '(?<routine>\bDIE\b|$function_re)';
+my $text_re = '"(?<text>(?:\\\\"|[^"]|"\s*[A-Z_]+\s*")*)"';
my $source_msg_call_re = qr/$source_msg_re(?:_nocontext)? \s*
\(aTHX_ \s*
(?:packWARN\d*\((?<category>.*?)\),)? \s*