develooper Front page | perl.perl5.porters | Postings from September 2012

Re: fixing smartmatch just hard enough (and when, too)

Thread Previous | Thread Next
Leon Timmermans
September 1, 2012 07:45
Re: fixing smartmatch just hard enough (and when, too)
Message ID:
On Sat, Sep 1, 2012 at 4:33 PM, Aaron Priven <> wrote:
> is it possible to add a binary infix operator in a Perl 5 module?

I don't think so (though never say never, who knows what edge-case
someone may be able to find). You could use the keywords mechanism to
some degree for named operators, but I suspect you can't get the
precedence right for most purposes (at least on the left side). I
think it could be very useful to have this ability, but AFAIK that'd
be non-trivial to implement.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About