in reply to Re^2: Dynamic function chains?
in thread Dynamic function chains?
Wouldn't a composite subroutine be more efficient?
Generally, evaling at runtime is quite expensive. You'd have to benchmark to say for sure. I guess it depends upon how many time your going to call the composite sub. If your processing large datasets, the cost of eval may become insignificant.
I usally avoid evaling stuff input from the command line, though ]broquaint]'s use of package->can() seems to avoid most of the risks that usually entails. I liked his solution a lot.
Yes, I screwed up the order. reverse is the easiest solution.
|
|---|