This related <i>URLs in Ruby</i> HN post maybe of interest: <a href="http://news.ycombinator.com/item?id=994716" rel="nofollow">http://news.ycombinator.com/item?id=994716</a><p>This inspired me at the time to write PerlX::QuoteOperator (<a href="http://search.cpan.org/dist/PerlX-QuoteOperator/" rel="nofollow">http://search.cpan.org/dist/PerlX-QuoteOperator/</a>) which allows you to create new custom quote-like operators (<a href="http://perldoc.perl.org/perlop.html#Quote-Like-Operators" rel="nofollow">http://perldoc.perl.org/perlop.html#Quote-Like-Operators</a>).<p>So for example to create a URI quote-like operator called <i>u</i>:<p><pre><code> use PerlX::QuoteOperator u => {
-emulate => 'q',
-with => sub ($) {
require URI;
URI->new( $_[0] );
},
};
my $uri = u(http://google.com);</code></pre>