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
In reply to Re: Re: variables names used to define variables
by hardburn
in thread variables names used to define variables
by Sandy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |