$self will become invalid if the object goes out scope before thread function reader exits.(Disclaimer: I'm not sure I'm following what you're saying.) That said, this ain't C++ so $self is a reference, not a pointer, and unlike pointers, references are smart. If the variable goes out of scope in one place but is also referenced from another scope, it won't become "invalid". (What's that, anyway? Do you mean undef? Dangling pointer (no such thing in Perl)? Or something else?) You might want to look into closures.
Makeshifts last the longest.
In reply to Re^2: OO and Threads conflict?
by Aristotle
in thread OO and Threads conflict?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |