in reply to Composing or chaining subroutines
You're effectively talking about in-lining the subroutines.
I did once think that it might be possible to create a true macro facility in Perl 5 by using B::Generate. The basic idea was that you could introspect the code generated by the macro using B::Bblock and similar modules, alias the formal/actual parameters, and then patch the code into the expansion scope using B::Generate.
Unfortunately, I never managed to get B::Generate to compile here, so the idea died with those attempts.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Composing or chaining subroutines
by chromatic (Archbishop) on Jan 14, 2006 at 19:13 UTC | |
|
Re^2: Composing or chaining subroutines
by diotalevi (Canon) on Jan 16, 2006 at 18:05 UTC | |
by BrowserUk (Patriarch) on Jan 16, 2006 at 19:33 UTC | |
by diotalevi (Canon) on Jan 16, 2006 at 20:38 UTC | |
by BrowserUk (Patriarch) on Jan 16, 2006 at 20:47 UTC | |
by diotalevi (Canon) on Jan 16, 2006 at 20:56 UTC | |
| |
|
Re^2: Composing or chaining subroutines
by Anonymous Monk on Jan 14, 2006 at 19:36 UTC | |
by BrowserUk (Patriarch) on Jan 14, 2006 at 20:18 UTC |