
Overriding the Backtick in Ruby - vijaydev
http://avdi.org/devblog/2010/12/20/overriding-the-backtick-in-ruby/
======
draegtun
This related _URLs in Ruby_ HN post maybe of interest:
<http://news.ycombinator.com/item?id=994716>

This inspired me at the time to write 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>).

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
Oh, Perl. Sometimes I honestly do miss you.

------
draegtun
The _overriding unary operators_ article referred to in post was discussed on
HN. See _Charging Objects in Ruby_
(<http://news.ycombinator.com/item?id=2022107>)

