Dave05 has asked for the wisdom of the Perl Monks concerning the following question:

A little thing. I have a base class and a subclass of the base class. In the base class is a method 'foo'. How can my method 'foo', when called on an object of the subclass, find the location on disk of the file with the subclass code?
use BaseClass; # has the 'foo' method use SubClass; # isa BaseClass my $obj = SubClass->new; $obj->foo; # foo needs to know full path to SubClass.pm
Cheers.

Replies are listed 'Best First'.
Re: Location of a subclass module on disk
by Abigail-II (Bishop) on Jan 29, 2004 at 17:42 UTC
      Perfect, thanks!