Build.PL
branchfoerste
changeset 63 f3a549693fdf
parent 29 6c8364b81a82
--- a/Build.PL	Tue Jul 15 15:11:29 2014 +0200
+++ b/Build.PL	Tue Jul 15 15:39:28 2014 +0200
@@ -36,6 +36,17 @@
         }
         $self->SUPER::ACTION_install;
     }
+    sub get_metadata {
+        my ($self, @args) = @_;
+        my $data = $self->SUPER::get_metadata(@args);
+        # workaround double utf encoded characters in MYMETA.{yml,json} ('ö'
+        # instead of 'ö' for example): the author name is taken from the pod in
+        # lib/Ius/Dav/Htpasswd.pm and the pod parser used by Module::Build is
+        # assuming latin1 despite the '=encoding' command
+        use Encode;
+        map { $_ = decode('utf8', $_); } @{$data->{author}} if defined $data->{author};
+        return $data;
+    }
 ___CODE
 );