Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But this gives my the following error -sub new { my $class = shift; my $self = { name => shift, ipAddress => shift, port => shift, stuff => new MyPackage::MyStuff(), }; my @paramters = ($self); my $thread = new Thread \&processJobs, \@paramters; bless $self, $class; return $self; } sub processJobs { my $self = shift; }
How can I pass in a reference to self so that my process can access members of my class.Pseudo-hashes are deprecated at line 43. thread failed to start: Bad index while coercing array into hash at li +ne 43.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing self to process as reference
by targetsmart (Curate) on Mar 18, 2009 at 10:10 UTC | |
by Anonymous Monk on Mar 18, 2009 at 10:14 UTC | |
|
Re: Passing self to process as reference
by ELISHEVA (Prior) on Mar 18, 2009 at 10:27 UTC | |
by Anonymous Monk on Mar 18, 2009 at 10:48 UTC | |
by ELISHEVA (Prior) on Mar 18, 2009 at 11:15 UTC | |
by Anonymous Monk on Mar 18, 2009 at 11:26 UTC | |
by ELISHEVA (Prior) on Mar 18, 2009 at 11:58 UTC | |
by Anonymous Monk on Mar 18, 2009 at 11:48 UTC | |
|
Re: Passing self to process as reference
by Anonymous Monk on Mar 18, 2009 at 09:56 UTC | |
by Anonymous Monk on Mar 18, 2009 at 10:05 UTC |