Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re2: Inline subs?

by dragonchild (Archbishop)
on May 02, 2003 at 13:36 UTC ( [id://254987]=note: print w/replies, xml ) Need Help??


in reply to Re: Inline subs?
in thread Inline subs?

Why doesn't this already exist?

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Replies are listed 'Best First'.
Re: Re2: Inline subs?
by broquaint (Abbot) on May 02, 2003 at 15:11 UTC
    Why doesn't this already exist?
    Because it's not as simple as it looks e.g
    sub foo : inline { my %args = @_; ... return $something; }
    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 ;)
    HTH

    _________
    broquaint

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://254987]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found