Re: $flags->as_arrayref directly



Kevin Ryde wrote:
I don't know why the PROTOTYPE: line doesn't have the desired effect.

I guess it only sticks a prototype on the sub, without changing how the
generated code actually checks the args.  Does that sound right?  In
which case if as_arrayref is only ever used as a method then I guess a
prototype has no effect.

Yeah, I think that sounds right. But still, the prototypes have been in stable releases, and they don't seem to do any harm -- so I don't think we should remove them.

The one on bool() likewise I suppose.  Is that func meant to be used as
a method?  Maybe it could helpfully lose b and swap the same
as_arrayref.  For that matter the other methods could similarly lose or
default to false their "swap".  union() and intersect() in particular
seem likely candidates to call as methods, for those who might prefer a
name over the operators.

Yep, that would indeed make sense.  Patches welcome!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]