in reply to How to pass a module method by reference to Thread?

You can't take a reference to a method call. But you could try this:

my $th = new Thread( sub { $p->run } ); # Line: 88

Replies are listed 'Best First'.
Re: Re: How to pass a module method by reference to Thread?
by d_i_r_t_y (Monk) on Jun 23, 2003 at 09:47 UTC
    sure you can:
        my $method_ref = $this->can("name_of_method_call");
        
        #...later...
        
        $method_ref->( $this, @args );