Subject: | PATCH: improve compatibility with older Perls |
This module uses "utf:is_utf8()", which was introduced in Perl 5.8.1. It
is functionally equivalent to "Encode::is_utf8()", which was introduced
in Perl 5.7.3.
This patch switches use the syntax to use "Encode::is_utf8()", which
allows the module to function on Perl 5.8.0, which is what I'm currently
using.
Mark
Subject: | encode_utf8.patch |
--- lib/WebService/YouTube/Util.pm.orig Sun Jan 7 09:27:35 2007
+++ lib/WebService/YouTube/Util.pm Tue Apr 3 14:10:37 2007
@@ -9,6 +9,7 @@
use Carp;
use LWP::UserAgent;
use URI::Escape qw(uri_escape uri_escape_utf8);
+use Encode;
sub rss_uri {
my ( $class, $type, $arg ) = @_;
@@ -17,7 +18,7 @@
croak "type of $type is not supported";
}
- if ( utf8::is_utf8($arg) ) {
+ if ( Encode::is_utf8($arg) ) {
$arg = uri_escape_utf8($arg);
}
else {
@@ -37,7 +38,7 @@
if ($fields) {
foreach my $key ( keys %{$fields} ) {
my $value = $fields->{$key};
- if ( utf8::is_utf8($value) ) {
+ if ( Encode::is_utf8($value) ) {
$value = uri_escape_utf8($value);
}
else {