Hi all,

I have a need to do this:
package BaseClass;
use threads;

sub doThis
{
   my $this = shift;

   threads->create(\doThat,$this);
}

package DerivedClass;
use base 'BaseClass';

sub new
{
   my $class = shift;
   my $this = $class->SUPER::new;
   return bless $this,$class;
}

sub doThat
{
...
}

--- in an app that uses these objects ---
use DerivedClass;
my $o = DerivedClass->new;
$o->doThis;

Notice that doThat is not in the base class, but rather in the subclass. Apparently Perl is not able to determine which package to use within doThis(). I have tried:
threads->create(\doThat,$this);
threads->create(\doThat,$this);
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to