Michael G Schwern wrote: > If you *really* wanted to write an optimized redirector, you'd > have the redirector eliminate itself. > > sub foo { > my $method = $_[0]->{"_foo"} || $_[0]->can("_foo"); > { > no warnings 'redefine'; > *foo = $method; > } > goto &$method; > } :) It's nice to see that someone looked at the import method in Pollute::Persistent At some point I came up with a list of Ways Life Would Improve If Perl Had Tail-Recursion, or something like that. It largely hinged on being able to access the calling context more aggressively than returning a value back into it, was a side-effect of something else, or required something else which had other beneficial effects. Sorry about the vagueness -- David Nicol 816.235.1187 A government of the p8a, by the p8a, and for the p8a.
- Re: Expunge implicit @_ passing Ken Fox
- Re: Expunge implicit @_ passing Piers Cawley
- Re: Expunge implicit @_ passing John Porter
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing John Porter
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing Ken Fox
- RE: Expunge implicit @_ passing Garrett Goebel
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing David L. Nicol
- Re: Expunge implicit @_ passing Ken Fox
- Re: Expunge implicit @_ passing Michael G Schwern
- Re: Expunge implicit @_ passing Damien Neil
- Re: Expunge implicit @_ passing Michael G Schwern
- RE: Expunge implicit @_ passing Hong Zhang
- RE: Expunge implicit @_ passing Brent Dax
- Re: Expunge implicit @_ passing Michael G Schwern
- RE: Expunge implicit @_ passing David Whipp
- Re: Expunge implicit @_ passing Damien Neil
- RE: Expunge implicit @_ passing Dan Sugalski