Skip Menu |

This queue is for tickets about the Sub-Infix CPAN distribution.

Report information
The Basics
Id: 85791
Status: open
Priority: 0/
Queue: Sub-Infix

People
Owner: perl [...] toby.ink
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Add more overloading for other operators
Sub::Infix could overload other operators, in my testing the following work (and are not unpleasant characters for :
  • %infix%
  • +infix+
  • *infix*
  • **infix**
Unfortunately -infix-, while it works, does so with warnings (Ambiguous use of -plus resolved as -&plus() at test.t line 7.) due to the stringification behaviour of unary '-'.  Might be worth adding it with a caveat that () is required, since an -infix()- operator syntax seems worth the extra ()s.

Also currently possible with Sub::Infix  but might be worth explicitly documenting:
  • Adding global operators with control characters, punctuation and numbers but which require the & before them when used (<<&1>>, /&*/)
  • Putting named operators into namespaces: <<String::concat>>, <<Array::push>>, |Method::1|