develooper Front page | perl.perl5.porters | Postings from January 2008

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
From:
David Nicol
Date:
January 28, 2008 22:34
Subject:
Re: For 5.12: tail calls for methods
Message ID:
934f64a20801282234v4e06e627lda9a5cc6c8d99bb7@mail.gmail.com
oops


On Jan 29, 2008 12:30 AM, David Nicol <davidnicol@gmail.com> wrote:
> anyone remember VAX asynchronous traps?
>
> anyway a dispatching framework that would call a function and when
> the thing that comes back is a redispatchme object, then dispatch that,
> otherwise return it.
>
>

sub dispatch{
        while(@_){
           my $func = shift;
           my $result = $func->(@_);
           ref($result) eq 'REDISPATCHME' or return $result;
           @_ = $result->args
        }
};

make that work with meethod calls? I dunno

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About