This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parts/apicheck.pl: A couple better diagnosics
authorKarl Williamson <khw@cpan.org>
Tue, 6 Aug 2019 21:49:54 +0000 (15:49 -0600)
committerNicolas R <atoomic@cpan.org>
Fri, 27 Sep 2019 22:39:29 +0000 (16:39 -0600)
(cherry picked from commit efe0e70e31d29bb9fdafee482bc4652151973f31)
Signed-off-by: Nicolas R <atoomic@cpan.org>
dist/Devel-PPPort/parts/apicheck.pl

index 1323190..cf30070 100644 (file)
@@ -266,10 +266,12 @@ for $f (@f) {   # Loop through all the tests to add
                               (?: \s* \b const \b \s* )? # opt. const
                               ( (?: \[ [^\]]* \] )* )    # opt. dimension(s)=> $d
                             $/x
-                     or die "$0 - cannot parse argument: [$a]\n";
+                     or die "$0 - cannot parse argument: [$a] in $f->{'name'}\n";
 
     # Replace a special argument name by something that will compile.
     if (exists $amap{$n}) {
+      die "$f->{'name'} had type $n, which should have been the whole type"
+                                                                    if $p or $d;
       push @arg, $amap{$n};
       next;
     }