openbsd-ports/audio/p5-gnupod/patches/patch-src_ext_FileMagic_pm

29 lines
1.1 KiB
Plaintext

$OpenBSD: patch-src_ext_FileMagic_pm,v 1.1 2010/10/21 21:44:36 sthen Exp $
Using a hash as a reference is deprecated in perl 5.12
--- src/ext/FileMagic.pm.orig Thu Oct 21 22:40:14 2010
+++ src/ext/FileMagic.pm Thu Oct 21 22:41:15 2010
@@ -362,7 +362,7 @@ sub __flatten {
foreach (keys(%{$in})) {
my $kvp = __flatten($_, $exclude); # key
next if !defined($kvp);
- my $v = __flatten(%{$in}->{$_}, $exclude); # value
+ my $v = __flatten($in->{$_}, $exclude); # value
$kvp .= " : ".$v if (defined($v) && ("$v" ne ""));
push @out, $kvp;
}
@@ -418,9 +418,9 @@ sub __merge_strings {
my $case = "check";
if (ref($options) eq "HASH") {
- $joinby = %{$options}->{joinby} if defined(%{$options}->{joinby});
- $wspace = lc(%{$options}->{wspace}) if defined(%{$options}->{wspace});
- $case = lc(%{$options}->{case}) if defined(%{$options}->{case});
+ $joinby = $options->{joinby} if defined($options->{joinby});
+ $wspace = lc($options->{wspace}) if defined($options->{wspace});
+ $case = lc($options->{case}) if defined($options->{case});
}
my $merged = "";