Hey William,
Ok, I've dug around, and I've got a working solution to my problem. It's
a bit ugly though:
package BaseClass;
...
sub doThis
{
my $pFunc;
eval '$pFunc = \&'.ref($this).'::doThat';
return threads->new($pFunc,$this);
}
package DerivedClass;
...
sub doThat
{
...
}
Essenti
Hello William,
Thanks for the tip. In your example you did this:
threads->create(\&DerivedClass::doThat,$this);
And it seems to work. But if I am to make the 'DerivedClass' portion
dynamic (as it has to work with other subclasses eg DerivedClass2,
DerivedClass3), how can I do it?
I think i
On 3/28/06, Bowie Bailey <[EMAIL PROTECTED]> wrote:
> Mario R. Sanchez, Ph.D. wrote:
> > hi pDale
> >
> > this is the entire code ...
> >
> > while(my $row_href = $sth->fetchrow_hashref)
> >{
> > print "$row_href->{'area'}\n";
> >}
> > foreach my $key (keys %$ro
Mario R. Sanchez, Ph.D. wrote:
> hi pDale
>
> this is the entire code ...
>
> while(my $row_href = $sth->fetchrow_hashref)
>{
> print "$row_href->{'area'}\n";
>}
> foreach my $key (keys %$row_href)
> {
> print "hi\n";
> print "$key = ".$row_href->{$key}
hi pDale
this is the entire code ...
while(my $row_href = $sth->fetchrow_hashref)
{
print "$row_href->{'area'}\n";
}
foreach my $key (keys %$row_href)
{
print "hi\n";
print "$key = ".$row_href->{$key}."\n";
}
=
the "while" correctly outpu
On 3/27/06, Mario R. Sanchez, Ph.D. <[EMAIL PROTECTED]> wrote:
>> how can i get the column names - what i presume to be the keys to the>> hashref? assume that i just want to list the column names.>>> Try this:> foreach my $key (keys %$row_href)
> {> print "$key = ".$row_href->{$key}."\n";> }
tr
In a message dated 3/28/2006 5:50:21 A.M. Eastern Standard Time,
[EMAIL PROTECTED] writes:
> Hi all,> > I have a need to do this (abstracted from the
attached working code):> package BaseClass;> use threads;>
> sub doThis> {> my $this =
shift;> >
threads->create(\&doThat,$this);
Hi all,
I have a need to do this (abstracted from the attached working code):
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;
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
{