Skip to content

Instantly share code, notes, and snippets.

@tomyhero
Created March 2, 2011 01:36
Show Gist options
  • Save tomyhero/850298 to your computer and use it in GitHub Desktop.
Save tomyhero/850298 to your computer and use it in GitHub Desktop.
addding elsif
sub _decode_args {
my($h, $ie) = @_;
for my $key( keys %{$h} ) {
if ( ref $h->{$key} eq 'ARRAY' ) {
my @values = map { Encode::decode($ie, $_) } @{$h->{$key}};
$h->{$key} = \@values;
}
elsif(ref $h->{$key} ){
# do nithing;
}
else {
$h->{$key} = Encode::decode($ie, $h->{$key});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment