in reply to Re2: Inline subs?
in thread Inline subs?
Why doesn't this already exist?Because it's not as simple as it looks e.g
This would require not just parsing out the sub but also the any munging of @_ and any exitting of the sub (e.g return, last etc). While I guess this could be done with a bit of op tree trickery or XS, a simple filter would only be suitable for dropping literal blocks of code (which would also have to comply with strictures). Having said that I probably will make a module, but with many, many disclaimers ;)sub foo : inline { my %args = @_; ... return $something; }
_________
broquaint
|
|---|