in reply to Passing self to process as reference
I tried running the code (with $self = {...} replaced by $self={} and it created the threads without the errors or warnings you report. My suspicion is that some of your data value are not what you think they are. The error appears to be coming from line 43 because the Thread module uses Carp, but it is actually coming from inside new when it tries to work with the contents of the parameter array.
Is this your actual code? I would try posting a slimmed down bit of code that we can run and actually shows the same warnings: including a call to your sub new with dummy data.
Also, why do you bless $self after calling processJobs? You can't use it as an object reference until it is blessed - it won't know where to find the method "foo" in $self->foo(...)
Best, beth
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing self to process as reference
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 |