summaryrefslogtreecommitdiff
path: root/lib/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse')
-rw-r--r--lib/Parse/PMFile.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Parse/PMFile.pm b/lib/Parse/PMFile.pm
index b32647f..3e33a7e 100644
--- a/lib/Parse/PMFile.pm
+++ b/lib/Parse/PMFile.pm
@@ -144,12 +144,25 @@ sub parse {
next; # don't screw up 02packages
}
}
+ unless ($self->_version_ok($pp)) {
+ $errors{$package} = {
+ long_version => qq{Version string exceeds maximum allowed length of 16b: "$pp->{version}"},
+ infile => $pp->{infile},
+ };
+ next;
+ }
$checked_in{$package} = $ppp->{$package};
} # end foreach package
return (wantarray && %errors) ? (\%checked_in, \%errors) : \%checked_in;
}
+sub _version_ok {
+ my ($self, $pp) = @_;
+ return if length($pp->{version} || 0) > 16;
+ return 1
+}
+
sub _perm_check {
my ($self, $package) = @_;
my $userid = $self->{USERID};