From 2ad5cd5fa3c0df762b5072ad1ae4fe31d0bfdd1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien@gmail.com>
Date: Thu, 24 Jan 2013 10:17:32 +0100
Subject: [PATCH 4/6] Simplify grouping by using ?'name'

?'name' is better for documentation than $1
---
 checks/cruft |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/checks/cruft b/checks/cruft
index a5a521b..2c8bb7d 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -450,15 +450,14 @@ sub find_cruft {
                 # if the "redeeming" part is in the next block.
                 #
                 # See cruft-gfdl-fp-sliding-win for the test case
-                when(m/GNU \s+ Free \s+ Documentation \s+ License (.{0,1024})
+                when(m/GNU \s+ Free \s+ Documentation \s+ License (?'gfdlsections'.{0,1024})
                          A \s+ copy \s+ of \s+ the \s+ license \s+ is \s+ included/xis) {
                     if (!exists $licenseproblemhash{'gfdl-invariants'}) {
-                        my $gfdlsections = $1;
                         # local space
                         my $s = '(?:\s|\@c)';
                         # GFDL license, assume it is bad unless it
                         # explicitly states it has no "bad sections".
-                        given($gfdlsections) {
+                        given($+{gfdlsections}) {
                             when(m/with $s+ (?:the$s+)? no $s+ Invariant $s+ Sections,?
                                         $s+ (?:with$s+)? (?:the$s+)? no $s+ Front-Cover $s+ Texts,? $s+ and
                                         $s+ (?:with$s+)? (?:the$s+)? no $s+ Back-Cover $s+ Texts/xiso) {
-- 
1.7.10.4

