This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Suppress irrelevant "MUST SKIP this step" RMG paragraphs
authorAaron Crane <arc@cpan.org>
Sun, 9 Jul 2017 12:54:26 +0000 (13:54 +0100)
committerAaron Crane <arc@cpan.org>
Sun, 16 Jul 2017 11:57:37 +0000 (12:57 +0100)
Sections that aren't relevant to the current release type are suppressed in
their entirety, so the remaining "MUST SKIP" messages are just confusing.
Remove them from the content.

Porting/make-rmg-checklist

index d7a9bc4..f116d23 100644 (file)
@@ -72,8 +72,13 @@ sub iterate_items {
     ITEM:
     foreach my $item ( @{$items} ) {
         foreach my $meta ( @{ $item->{'metadata'} || [] } ) {
-            $meta =~ /skip .+ $type/xms
-                and next ITEM;
+            if ( $meta =~ /skip .+ $type/xms ) {
+                next ITEM;
+            }
+            elsif ( $meta =~ /skip/xms ) {
+                $item->{content} =~
+                    s/^ [^\n]* \b MUST\ SKIP\ this\ step \b [^\n]* \n\n//xms;
+            }
         }
 
         $cb->($item);