Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Capturing STDERR using IO::Handle

by Sidhekin (Priest)
on Nov 26, 2007 at 15:48 UTC ( #653008=note: print w/replies, xml ) Need Help??

in reply to Capturing STDERR using IO::Handle

This can't be done with simple ties.

It can be done with Test::Trap, though. :) (Shameless as ever ....)

use Test::Trap qw/ :flow:stderr(systemsafe) /; # or similar trap { system 'command', 'with', 'args' }; my @logmessages = split /\n/, $trap->stderr; # chomped! or season to t +aste

Not exclusively for use in test scripts, indeed. :)

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://653008]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2016-10-26 05:36 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (336 votes). Check out past polls.