in reply to Re: Re: Optimizing away calls to functions defined in eval
in thread Optimizing away calls to functions defined in eval
sub getset_subs { return [qw/size height weight/]; }
That can be used by the generator program to take the existing package and add a bunch of set/get subs to the end of it.
This isn't perfect for all situations, you don't always know what you want before hand. But memory is cheap, IMO always calculate & produce code before hand if you can instead of producing the same structures at runtime again and again. Just make sure to keep the machine generated code machine generated. Editing machine generated code is a maintenance nightmare.
-jackdied
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Optimizing away calls to functions defined in eval
by dragonchild (Archbishop) on Oct 17, 2001 at 02:23 UTC | |
by jackdied (Monk) on Oct 17, 2001 at 02:47 UTC |