aboutsummaryrefslogtreecommitdiffstats
path: root/perl.prov
diff options
context:
space:
mode:
Diffstat (limited to 'perl.prov')
-rwxr-xr-xperl.prov32
1 files changed, 16 insertions, 16 deletions
diff --git a/perl.prov b/perl.prov
index c20c6e9..db41847 100755
--- a/perl.prov
+++ b/perl.prov
@@ -84,7 +84,7 @@ exit 0;
sub process_file {
my ($file) = @_;
-
+
if (!open(FILE, $file)) {
warn("$0: Warning: Could not open file '$file' for reading: $!\n");
return;
@@ -94,7 +94,7 @@ sub process_file {
my ($package, $version, $incomment, $inover) = ();
while (<FILE>) {
-
+
# skip the documentation
# we should not need to have item in this if statement (it
@@ -109,7 +109,7 @@ sub process_file {
$incomment = 0;
$inover = 0;
}
-
+
if (m/^=(over)/) {
$inover = 1;
}
@@ -121,7 +121,7 @@ sub process_file {
if ($incomment || $inover || m/^\s*#/) {
next;
}
-
+
# skip the data section
if (m/^__(DATA|END)__$/) {
last;
@@ -134,9 +134,9 @@ sub process_file {
if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
# some internal packages, like DB, might be temporarily redefined inside a module.
if (!($package && $1 eq 'DB')) {
- $package=$1;
+ $package = $1;
undef $version;
- $require{$package}=undef;
+ $require{$package} = undef;
}
}
@@ -152,8 +152,8 @@ sub process_file {
#DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
#$Locale::Maketext::Simple::VERSION = '0.21';
- if (
- ($package) &&
+ if (
+ $package &&
(m/^(.*;)?\s*((my|our)\s+)?\$(${package}::)?VERSION\s*=\s+/)
) {
@@ -162,23 +162,23 @@ sub process_file {
# common method of non static numbering.
if (m/\$Revision: (\d+[.0-9]+)/) {
- $version= $1;
- } elsif (m/VERSION.*?[\'\"]?(\d+[._0-9]+)[\'\"]?/) {
+ $version = $1;
+ } elsif (m/VERSION.*?['"]?(\d+[._0-9]+)['"]?/) {
# look for a static number hard coded in the script
- $version= $1;
+ $version= $1;
}
- $require{$package}=$version;
+ $require{$package} = $version;
}
-
+
# Each keyword can appear multiple times. Don't
# bother with datastructures to store these strings,
# if we need to print it print it now.
- if ( m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) {
+ if (m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) {
foreach $_ (split(/\s+/, $1)) {
- print "$_\n";
+ print "$_\n";
}
}
@@ -187,5 +187,5 @@ sub process_file {
close(FILE) ||
die("$0: Could not close file: '$file' : $!\n");
- return ;
+ return;
}