in reply to Re: variables names used to define variables
in thread variables names used to define variables
There are no references to subs involved in finding methods when it comes to class or object method calling.
Yes there is. Otherwise, this code wouldn't work:
$ perl -Mstrict -e ' package My::Foo; sub bar { my $class = shift; print "Calling $class->bar\n"; } package main; my $class = "My::Foo"; my $method = "bar"; $class->$method(); ' Calling My::Foo->bar $
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: variables names used to define variables
by Abigail-II (Bishop) on Dec 11, 2003 at 17:06 UTC | |
by hardburn (Abbot) on Dec 11, 2003 at 17:23 UTC |