apkbuild-cpan.in: fix use of uninitialized value $1

This commit is contained in:
Celeste 2024-01-05 02:24:13 +00:00 committed by Timothy Legge
parent c704644b3c
commit 1753907af0
1 changed files with 5 additions and 4 deletions

View File

@ -105,10 +105,11 @@ sub read_assignments_from_file {
$hash{'options'} = "$1" if length($options) >= 1;
$hash{'options_comment'} = "$2" if length($options) >= 1;
my $source = $text =~ m/^source=\"([^\"]*)\"/mg;
my @patches = split (/\n/m, $1);
shift @patches;
$hash{'patches'} = \@patches;
if ($text =~ m/^source=\"([^\"]*)\"/mg) {
my @patches = split (/\n/m, $1);
shift @patches;
$hash{'patches'} = \@patches;
}
return \%hash;
}