"I'm actually not using package global variables."
Then you need to show the declaration of the lexical variables you are using.
In:
sub finish { ... $h = $self->{'h'}; ... }
The scope of $h is not confined to &finish but it should be. You don't show where it's declared or what else uses this $h (with global-like scope). When you move the code in &finish to another package, a different global-like $h will be involved.
In:
sub start { ... $self->{'h'} = h; }
I don't know what &h is doing: you don't show a sub h {...} definition. Maybe that's related to the problem. And, of course, h being a subroutine call is just a guess on my part: for all I know, it could be a directory handle.
I recommend you reduce this down to the shortest amount of code which reproduces the problem ["How do I post a question effectively?" provides guidelines for achieving this]. Doing so, may actually highlight your problem such that you can resolve it yourself. If it doesn't, at least there's something we can run without having to guess what code you haven't shown.
-- Ken
In reply to Re^3: IPC::Run harness question
by kcott
in thread IPC::Run harness question
by italdesign
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |