APM: OOP question
Wayne Walker
wwalker at broadq.com
Sat Sep 13 19:31:44 CDT 2003
I have an issue about inheritance and Class methods (rather than object
methods). Any help would be appreciated.
For those of you who didn't ace telepathy 305, here's the code:
$miracle = Foo::Bar::get_data();
package Foo;
sub get_data
{
my $class = shift; # this will = Foo::Bar at runtime
$magic_dust = $class::get_dust();
$miracle = convert($magic_dust);
return $miracle;
}
package Foo::Bar
sub get_dust
{
# stuff....
return convert($beans);
}
The problem is that I cannot get the syntax right to run
Foo::Bar::get_dust() inside Foo::get_data().
There will also be Foo::Baz::get_dust().
Applications will call the non-existant Foo::Baz::get_data
Foo::Bar::get_data, etc...
--
Wayne Walker
www.broadq.com :) Bringing digital video and audio to the living room
More information about the Austin
mailing list