From 03a8d4e683966fbd7228d4168dc68c2841970f23 Mon Sep 17 00:00:00 2001 From: Ralf Ertzinger Date: Wed, 3 Aug 2011 23:10:58 +0200 Subject: [PATCH] Base: Add decode_hexurl function --- videosite/Base.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/videosite/Base.pm b/videosite/Base.pm index 55a15e6..577eb52 100644 --- a/videosite/Base.pm +++ b/videosite/Base.pm @@ -178,4 +178,13 @@ sub ua { return LWP::UserAgent->new('agent' => 'Mozilla/5.0', 'cookie_jar' => HTTP::Cookies->new); } +sub decode_hexurl { + my $self = shift; + my $d = shift; + + $d =~ s/%([[:xdigit:]]{2})/chr(hex($1))/ge; + + return $d; +} + 1; -- 1.8.3.1