4 ms·
This related URLs in Ruby HN post maybe of interest: http://news.ycombinator.com/item?id=994716 http://news.ycombinator.com/item?id=994716 This inspired me at
by draegtun 16y ago
This related URLs in Ruby HN post maybe of interest: http://news.ycombinator.com/item?id=994716 http://news.ycombinator.com/item?id=994716
This inspired me at the time to write PerlX::QuoteOperator (http://search.cpan.org/dist/PerlX-QuoteOperator/ http://search.cpan.org/dist/PerlX-QuoteOperator/) which allows you to create new custom quote-like operators (http://perldoc.perl.org/perlop.html#Quote-Like-Operators http://perldoc.perl.org/perlop.html#Quote-Like-Operators).
So for example to create a URI quote-like operator called u:
use PerlX::QuoteOperator u => {
-emulate => 'q',
-with => sub ($) {
require URI;
URI->new( $_[0] );
},
};
my $uri = u(http://google.com);
- avdi 16y agoOh, Perl. Sometimes I honestly do miss you.