This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54b3baf
)
parts/apicheck.pl: Add white-space to m//x for readability
author
Karl Williamson
<khw@cpan.org>
Wed, 14 Aug 2019 19:04:14 +0000
(13:04 -0600)
committer
Nicolas R
<atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:29 +0000
(16:39 -0600)
And some comments to regex
(cherry picked from commit
a76243946786233602fab339e55b29851c3785e9
)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/apicheck.pl
patch
|
blob
|
blame
|
history
diff --git
a/dist/Devel-PPPort/parts/apicheck.pl
b/dist/Devel-PPPort/parts/apicheck.pl
index
88869d6
..
1ac8eb5
100644
(file)
--- a/
dist/Devel-PPPort/parts/apicheck.pl
+++ b/
dist/Devel-PPPort/parts/apicheck.pl
@@
-259,10
+259,11
@@
for $f (@f) { # Loop through all the tests to add
}
# Split this type into its components
- my($n, $p, $d) = $a =~ /^ (\w+(?:\s+\w+)*)\s* # type name => $n
- (\**) # pointer => $p
- (?:\s*\bconst\b\s*)? # const
- ((?:\[[^\]]*\])*) # dimension => $d
+ my($n, $p, $d) = $a =~ /^ ( \w+ (?: \s+ \w+ )* ) # type name => $n
+ \s*
+ ( \** ) # optional pointer(s) => $p
+ (?: \s* \b const \b \s* )? # opt. const
+ ( (?: \[ [^\]]* \] )* ) # opt. dimension(s)=> $d
$/x
or die "$0 - cannot parse argument: [$a]\n";