| Test-Run-CmdLine documentation | Contained in the Test-Run-CmdLine distribution. |
Test::Run::CmdLine::Trap::ProveApp - trap the output of a run of Test::Run::CmdLine::Prove::App.
Testing class to trap the output of a
perl -MTest::Run::CmdLine::Prove::App ... run.
Traps the output of the application with the command line args of @ARGS.
Returns the object. To be used as a constructor.
Shlomi Fish, <shlomif@iglu.org.il>
Please report any bugs or feature requests to
bug-test-run-cmdline@rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Test::Run::CmdLine::Trap::ProveApp
You can also look for information at:
The latest source of Test::Run::CmdLine is available from the Test::Run BerliOS Subversion repository:
https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/
Copyright 2005 Shlomi Fish, all rights reserved.
This program is released under the MIT X11 License.
| Test-Run-CmdLine documentation | Contained in the Test-Run-CmdLine distribution. |
package Test::Run::CmdLine::Trap::ProveApp; use strict; use warnings; use base 'Test::Run::Trap::Obj'; use Test::Trap qw( trap $trap :flow:stderr(systemsafe):stdout(systemsafe):warn ); sub trap_run { my ($class, $args) = @_; my $cmdline = $args->{cmdline}; trap { system( $^X, "-MTest::Run::CmdLine::Prove::App", "-e", "run()", "--", @$cmdline, ); }; return $class->new({ ( map { $_ => $trap->$_() } (qw(stdout stderr die leaveby exit return warn wantarray))) }); } 1;