diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index 0e89be9..b5720b6 100755 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -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; }