develooper Front page | perl.perl6.language | Postings from June 2005

Re: proposal: binding with a function

Thread Previous | Thread Next
Piers Cawley
June 23, 2005 07:31
Re: proposal: binding with a function
Message ID:
Brent 'Dax' Royal-Gordon <> writes:
> As I've said before, Perl supports `alias`--it's just spelled `:=`.

Here's a rubyish idiom:

  my &old_behaviour := &function;

  &function := sub { try_some_stuff || &old_behaviour }

Except, with binding it doesn't work like that, you end up with an infinite

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About