develooper Front page | perl.perl5.porters | Postings from August 2013

Custom infix operators (was: feature request: string-or)

Thread Next
Peter Martini
August 4, 2013 15:34
Custom infix operators (was: feature request: string-or)
Message ID:
On Sun, Aug 4, 2013 at 1:40 AM, Father Chrysostomos <> wrote:
> Felipe Gasper asked:
>> Where can I find documentation on implementing custom operators in Perl?
> Perl currently has no mechanism for custom infix operators.  It has
> been discussed a few times, but no serious volunteers have stepped up
> to the challenge.  Peter Martini submitted a demo patch (just a toy),
> but it was barely sufficient, only allowing two precedence levels
> (<>).

Of the potential issues with the patch, I hadn't though an
insufficient number of precedence levels would be one of them, the
distinction being, conceptually, like 'and' or like '&&'.  Can you
give more details on what other precedence levels could be offered?

I didn't push any further with the patch mainly because (as far as I
know) the custom operators we have already were designed by Zefram,
and he's not happy with how its currently done, so pushing further
seemed unwise without proper insight into what the problems are.

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