On Mon, 20 Jun 2005, BÁRTHÁZI András wrote:
Hi,
> Is there a way, to catch, if I call a method, that doesn't exists, to run
> a default one? I'm thinking about an "error handler" method.
See all the AUTO subs.
Cool! Where? Is it working currently with Pugs?
Synposis 10...
abhijit
Abhi
BÁRTHÁZI András skribis 2005-06-20 17:34 (+0200):
> Cool! Where? Is it working currently with Pugs?
S10. I don't know how much of that is supported by Pugs.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
Hi,
Is there a way, to catch, if I call a method, that doesn't exists, to
run a default one? I'm thinking about an "error handler" method.
See all the AUTO subs.
Cool! Where? Is it working currently with Pugs?
Bye,
Andras
András,
I think you have just discovered AUTOLOAD :-)
OTOH I don't know how the AUTOLOAD mechanism will work in Perl6 compared
to Perl5, or if it has been imlemented in Pugs (yet), but as far as I
remember, in Apocalypse 12 somewhere it says it will work the same(?) as
in Perl5, and what you
BÁRTHÁZI András skribis 2005-06-20 17:18 (+0200):
> Is there a way, to catch, if I call a method, that doesn't exists, to
> run a default one? I'm thinking about an "error handler" method.
See all the AUTO subs.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_jue
Hi,
Is there a way, to catch, if I call a method, that doesn't exists, to
run a default one? I'm thinking about an "error handler" method. If not,
I would like to propose this:
class MyClass {
method example ($self: $var) {
say "HELLO";
}
method default