WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f679317

Browse files
committed
Fixes
1 parent 80ca6e6 commit f679317

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

lib/Module/Install.pm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,6 @@ sub _CLASS {
443443
) ? $_[0] : undef;
444444
}
445445

446-
sub _to_bytes {
447-
utf8::encode($_[0]) if utf8::is_utf8 $_[0];
448-
return $_[0];
449-
}
450-
451446
1;
452447

453448
# Copyright 2008 - 2012 Adam Kennedy.

lib/Module/Install/Metadata.pm

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -628,12 +628,7 @@ sub add_metadata {
628628
for my $key (keys %hash) {
629629
warn "add_metadata: $key is not prefixed with 'x_'.\n" .
630630
"Use appopriate function to add non-private metadata.\n" unless $key =~ /^x_/;
631-
$self->{values}{$key} =
632-
ref $hash{$key} eq "ARRAY"
633-
?
634-
[ map { Module::Install::_to_bytes($_) } @{$hash{$key}} ]
635-
:
636-
Module::Install::_to_bytes($hash{$key});
631+
$self->{values}{$key} = $hash{$key};
637632
}
638633
}
639634

t/31_add_metadata.t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ END_DSL
2929
ok( -f $file);
3030
my $yaml = YAML::Tiny::LoadFile($file);
3131
ok( $yaml->{x_foo} && $yaml->{x_foo} eq 'bar' );
32+
use utf8;
3233
is( $yaml->{x_author}, "Alberto Simões");
3334
ok( kill_dist(), 'kill_dist' );
3435
}

0 commit comments

Comments
 (0)