"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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.