in reply to Re: Why is IPC::Open2 behaving differently in a .pm?
in thread Why is IPC::Open2 behaving differently in a .pm?

With program as you specify it, both work. With my own program (baton-metaquery from https://github.com/wtsi-npg/baton), even with local $| set, it doesn't.

However the question is why the 1-liner with the in-line MyPack package works, but copy/pasted MyPack code in to a .pm does not work. How can that be possible?

  • Comment on Re^2: Why is IPC::Open2 behaving differently in a .pm?

Replies are listed 'Best First'.
Re^3: Why is IPC::Open2 behaving differently in a .pm? (wrong)
by tye (Sage) on Aug 17, 2015 at 14:35 UTC

    Because that isn't the actual source of the difference. You have just convinced yourself that it is. And then you posted code but removed the parts that you don't think are the cause of the difference and people have shown that this incomplete code (when made to actually work) doesn't demonstrate that difference.

    The problem is in the parts that you didn't post.

    - tye        

      Yes, you're quite right. The problem was my json contained single quotes. If I removed them it works the same in both.