AnyEvent-Redis
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
# of Pod::Text 3.x (see also below).
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
# Pod::Text < 3.0 has yet another mapping table,
# though the table name of 2.x and 1.x are different.
# (1.x is in core of Perl < 5.6, 2.x is in core of
# Perl < 5.9.3)
my $mapping = ($Pod::Text::VERSION < 2)
? \%Pod::Text::HTML_Escapes
: \%Pod::Text::ESCAPES;
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
$author =~ s{E<lt>}{<}g;
$author =~ s{E<gt>}{>}g;
}
$self->author($author);
} else {
my $val = "लà¤à¤à¤¨à¤¹à¤¿";
$r->set($key => $val, sub { pass "SET literal UTF-8 key/value" });
$r->get($key, sub {
is $_[0], $val, "GET literal UTF-8 key/value";
});
}
my $utf8_key = "\x{a3}\x{acd}";
my $utf8_val = "\x{90e}\x{60a}";
$r->set($utf8_key => $utf8_val, sub {
pass "SET escaped UTF-8 key/value"
});
$r->get($utf8_key, sub {
is $_[0], $utf8_val, "GET escaped UTF-8 key/value";
});
my $latin1_key = "V\x{f6}gel";
my $latin1_val = "Gr\x{fc}n";
$r->set($latin1_key => $latin1_val, sub {
pass "SET escaped Latin-1 key/value"
});
$r->get($latin1_key, sub {
is $_[0], $latin1_val, "GET escaped Latin-1 key/value";
});
$r->all_cv->end;
$r->all_cv->recv;
eval { AnyEvent::Redis->new(encoding => "invalid") };
like $@, qr/Encoding "invalid" not found/;
}
# Extra args for the constructor
( run in 1.029 second using v1.01-cache-2.11-cpan-c21f80fb71c )