27 lines
1018 B
Diff
27 lines
1018 B
Diff
|
Support package statements like "package 1.2.3;" and "package 1.2.3 {", which are
|
||
|
new in Perl 5.12 and 5.14
|
||
|
|
||
|
--- ./scripts/perl.prov.orig 2017-06-09 15:20:11.869617486 +0200
|
||
|
+++ ./scripts/perl.prov 2017-06-09 15:04:59.840952250 +0200
|
||
|
@@ -129,9 +129,9 @@
|
||
|
# package name so we report all namespaces except some common
|
||
|
# false positives as if they were provided packages (really ugly).
|
||
|
|
||
|
- if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
|
||
|
+ if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*(?:v?([0-9_.]+)\s*)?[;{]/) {
|
||
|
$package = $1;
|
||
|
- undef $version;
|
||
|
+ $version = $2;
|
||
|
if ($package eq 'main') {
|
||
|
undef $package;
|
||
|
} else {
|
||
|
@@ -139,7 +139,7 @@
|
||
|
# the package definition is broken up over multiple blocks.
|
||
|
# In that case, don't stomp a previous $VERSION we might have
|
||
|
# found. (See BZ#214496.)
|
||
|
- $require{$package} = undef unless (exists $require{$package});
|
||
|
+ $require{$package} = $version unless (exists $require{$package});
|
||
|
}
|
||
|
}
|
||
|
|