Will it also be possible to collect the return values of those method calls?
--
#!/usr/bin/perl
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
| [reply] [d/l] |
Yes. Each method will be called in the same context as
the original call through EVERY::, and the
collective return value will be:
- a ref to an array of scalars (in scalar context)
- a list of refs to arrays (in list context)
That is, EVERY:: will aggregrate the individual return values, and return them in a form appropriate to the calling context.
| [reply] [d/l] [select] |
Should I then wait for your release and dump my code, wait for your release, benchmark and then dump the slower code, or still put Class::DispatchToAll on CPAN (in compliance with TMTOWTDI, especially as I might extend my code to do some other stuff (like width-first traversal, or returning the package a method was found in and the return value..))?
--
#!/usr/bin/perl
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}
| [reply] [d/l] |