True, but then it wouldn't be able to break encapsulation and pull out $other->{_code} to speed things up by avoiding another overloaded &{} dispatch. Then again that's not exactly safe either, but what does one expect for a ten minute one-off example. :)
A better solution might be to ask if UNIVERSAL::can( $other, "to_code" ) and then use that to obtain a coderef from $other (which would be starting to look a bit like duck typing . . .).
In reply to Re^4: subroutine concatenation
by Fletch
in thread subroutine concatenation
by imcsk8
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |