Merge it in with the macro capability.

That would be an immediate subroutine. One that simply returns
undef. (i.e. Nothing inserted into the parse stream.)

Hmm, maybe nothing needs to be added to that.

<chaim>

>>>>> "NT" == Nathan Torkington <[EMAIL PROTECTED]> writes:

NT> I'm chewing over an RFC on giving you more control over the
NT> compile-time and run-time nature of functions.  One possibility is to
NT> define an attribute for subroutines that means they're BEGIN-like:

NT>   sub CLEANUP :immediate :blockish (&) {
NT>     push(@cleanup_handlers, @_);
NT>   }
NT>   END {
NT>     print "Starting cleanup\n";
NT>     foreach (@cleanup_handlers) {
NT>       &$;
NT>     }
NT>   }

NT>   CLEANUP { unlink $tempfile }
NT>   CLEANUP { close SOCKET }

NT> C<cleanup> would:
NT>  - be called at compile-time (:immediate)
NT>  - not need a semicolon (:blockish)

NT> I'm just not sure whether this is an itch that needs to be scratched.

-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to