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

Re: How do I... invoke a method reference

Thread Previous | Thread Next
From:
Juerd
Date:
May 19, 2005 14:09
Subject:
Re: How do I... invoke a method reference
Message ID:
20050519210850.GB31996@c4.convolution.nl
Ingo Blechschmidt skribis 2005-05-19 22:45 (+0200):
>   class Foo {
>     method bar() { 42 }
>     method baz() { &bar }
>   }
>   my $ref = Foo.baz;

My guess:

    Foo.$ref
    $object.$ref

Just like in Perl 5.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

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