[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#653099: ITP: liburi-encode-perl -- Perl module to encode and decode strings to URIs



On Fri, 23 Dec 2011, Ernesto Hernández-Novich wrote:
> * Package name    : liburi-encode-perl
>   Version         : 0.04
>   Upstream Author : Mithun Ayachit <mithun@cpan.org>
> * URL             : http://search.cpan.org/dist/URI-Encode/
> * License         : Artistic
>   Programming Lang: Perl
>   Description     : Perl module to encode and decode strings to URIs
> 
> URI::Encode provides an easy method to encode strings (mainly URLs)
> into a format which can be pasted into a plain text, so that those
> links are 'clickable' by the person reading it.
> 
> If you are looking for speed and want to encode reserved characters,
> use URI::Escape::XS

Why is anyone using URI::Encode instead of URI::Escape, which handles
all of this, is faster to boot, and is in core? If you actually wanted
its main feature, you'd just use:

use URI::Escape qw(uri_escape_utf8);
uri_escape_utf8($string,"^A-Za-z0-9\-\._~:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=");


Don Armstrong

-- 
The solution to a problem changes the problem.
 -- Peer's Law

http://www.donarmstrong.com              http://rzlab.ucr.edu


Reply to: