i want to test error checks in a module i'm working on. the error paths carp() the problem and then proceed.
is there any way to capture the carp text (without using some of Carp.pm's internal routines) for testing that they're correct under the various error conditions?
Test::Warn should do the job:
use Test::Warn; warnings_like { carp "Danger! Danger!" } qr/^Danger! Danger!/;
Adrian