diff options
author | Yorhel <git@yorhel.nl> | 2009-11-17 22:34:27 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-11-17 22:34:27 +0100 |
commit | 8448e6a074a5b5899db99567b625506fc57689c9 (patch) | |
tree | 46ff90e868e32190f25d78cb02a785a9162fe64f /lib | |
parent | 09db8c10ff6ebcd23b8b5ab8a30c219ad298a1a0 (diff) |
Multi::Core: Surpress warning about STDIO being tied in POE::Wheel::Run
Warning can be safely ignored in our case. A bit hack'ish approach
though...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Multi/Core.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Multi/Core.pm b/lib/Multi/Core.pm index 28555e51..9eaa6269 100644 --- a/lib/Multi/Core.pm +++ b/lib/Multi/Core.pm @@ -131,7 +131,14 @@ package Multi::Core::STDIO; use base 'Tie::Handle'; sub TIEHANDLE { return bless \"$_[1]", $_[0] } -sub WRITE { Multi::Core::log_msg(${$_[0]}.': '.$_[1]) } +sub WRITE { + my($s, $msg) = @_; + # Surpress warning about STDIO being tied in POE::Wheel::Run::new(). + # the untie() is being performed in the child process, which doesn't effect + # the parent process, so the tie() will still be in place where we want it. + return if $msg =~ /^Cannot redirect into tied STD(?:ERR|OUT)\. Untying it/; + Multi::Core::log_msg($$s.': '.$msg); +} 1; |