[devscripts] 01/16: licensecheck: do not use outer $_ in function, use declared parameter
dod at debian.org
dod at debian.org
Thu May 14 16:34:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository devscripts.
commit 405c7c69f052553ed9adceaa67f8a5d5b457fccd
Author: Dominique Dumont <dod at debian.org>
Date: Wed May 13 08:23:47 2015 +0200
licensecheck: do not use outer $_ in function, use declared parameter
---
scripts/licensecheck.pl | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 5b6d0d3..2f16133 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -317,6 +317,7 @@ while (@files) {
}
sub parse_copyright {
+ my $data = shift ;
my $copyright = '';
my $match;
@@ -338,22 +339,22 @@ sub parse_copyright {
^[#]define\s+.*\(c\) # #define foo(c) -- not copyright
)';
- if ( ! m%$copyright_predisindicator_regex%ix) {
-
- if (m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%ix) {
- $match = $1;
-
- # Ignore lines matching "see foo for copyright information" etc.
- if ($match !~ m%^\s*$copyright_disindicator_regex%ix) {
- # De-cruft
- $match =~ s/([,.])?\s*$//;
- $match =~ s/$copyright_indicator_regex//igx;
- $match =~ s/^\s+//;
- $match =~ s/\s{2,}/ /g;
- $match =~ s/\\@/@/g;
- $copyright = $match;
- }
- }
+ if ( $data !~ m%$copyright_predisindicator_regex%ix) {
+
+ if ($data =~ m%$copyright_indicator_regex(?::\s*|\s+)(\S.*)$%lix) {
+ $match = $1;
+
+ # Ignore lines matching "see foo for copyright information" etc.
+ if ($match !~ m%^\s*$copyright_disindicator_regex%ix) {
+ # De-cruft
+ $match =~ s/([,.])?\s*$//;
+ $match =~ s/$copyright_indicator_regex//igx;
+ $match =~ s/^\s+//;
+ $match =~ s/\s{2,}/ /g;
+ $match =~ s/\\@/@/g;
+ $copyright = $match;
+ }
+ }
}
return $copyright;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list