summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-27 10:43:19 +0100
committerYorhel <git@yorhel.nl>2011-01-27 10:43:19 +0100
commit78f364130abe51a4baeeef1e20a7292c3a1a28dd (patch)
treec839cca89c576b3cfde2faacecddd617b60dd335
parent08d3dffe2dc6b955f2e10629079d5ae5c32f7183 (diff)
TUWF: Use the uri_escape() provided by TUWF
-rw-r--r--lib/Multi/IRC.pm3
-rw-r--r--lib/VNDB/Handler/Misc.pm2
-rw-r--r--lib/VNDB/Handler/Releases.pm2
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm2
-rw-r--r--lib/VNDB/Plugin/TransAdmin.pm2
-rw-r--r--lib/VNDBUtil.pm11
6 files changed, 7 insertions, 15 deletions
diff --git a/lib/Multi/IRC.pm b/lib/Multi/IRC.pm
index 22e4021b..2967724c 100644
--- a/lib/Multi/IRC.pm
+++ b/lib/Multi/IRC.pm
@@ -15,7 +15,8 @@ use POE qw|
|;
use POE::Component::IRC::Common ':ALL';
use Time::HiRes 'time';
-use VNDBUtil 'normalize_query', 'uri_escape';
+use VNDBUtil 'normalize_query';
+use TUWF::Misc 'uri_escape';
use constant {
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm
index 426de785..d3791c81 100644
--- a/lib/VNDB/Handler/Misc.pm
+++ b/lib/VNDB/Handler/Misc.pm
@@ -4,7 +4,7 @@ package VNDB::Handler::Misc;
use strict;
use warnings;
-use TUWF ':html', ':xml', 'xml_escape';
+use TUWF ':html', ':xml', 'xml_escape', 'uri_escape';
use VNDB::Func;
use POSIX 'strftime';
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm
index 32608d30..be1d8bd4 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -3,7 +3,7 @@ package VNDB::Handler::Releases;
use strict;
use warnings;
-use TUWF ':html';
+use TUWF ':html', 'uri_escape';
use VNDB::Func;
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index f3bad521..53c07db2 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -3,7 +3,7 @@ package VNDB::Handler::VNBrowse;
use strict;
use warnings;
-use TUWF ':html';
+use TUWF ':html', 'uri_escape';
use VNDB::Func;
diff --git a/lib/VNDB/Plugin/TransAdmin.pm b/lib/VNDB/Plugin/TransAdmin.pm
index 35dd10ce..5729432d 100644
--- a/lib/VNDB/Plugin/TransAdmin.pm
+++ b/lib/VNDB/Plugin/TransAdmin.pm
@@ -16,7 +16,7 @@ package VNDB::Plugin::TransAdmin;
use strict;
use warnings;
-use TUWF ':html';
+use TUWF ':html', 'uri_escape';
use LangFile;
use VNDB::Func;
diff --git a/lib/VNDBUtil.pm b/lib/VNDBUtil.pm
index f5650d6d..6285e77a 100644
--- a/lib/VNDBUtil.pm
+++ b/lib/VNDBUtil.pm
@@ -8,7 +8,7 @@ use Exporter 'import';
use Encode 'encode_utf8';
use Unicode::Normalize 'NFKD';
-our @EXPORT = qw|shorten bb2html gtintype normalize normalize_titles normalize_query imgsize uri_escape|;
+our @EXPORT = qw|shorten bb2html gtintype normalize normalize_titles normalize_query imgsize|;
sub shorten {
@@ -242,14 +242,5 @@ sub imgsize {
}
-# Same as URI::Escape::uri_escape_utf8(), only simpler and doesn't add extra
-# dependencies
-sub uri_escape {
- local $_ = encode_utf8 shift;
- s/([^A-Za-z0-9._~-])/sprintf '%%%02X', ord $1/eg;
- return $_;
-}
-
-
1;