Subject: | would love to see assert_undefined |
With everything that C:A:More offers I would love to see a
assert_undefined. I can't think of an easy to fake it with the current
assert_defined. Heres a quickie example of how I would use this:
eval {
$data = XMLin($file);
};
assert_undefined($@, q{not proper XML});
my guess is that it would just be a basic copy of the current
assert_defined:
=head2 assert_undefined( $this [, $name] )
Asserts that I<$this> is not defined.
=cut
sub assert_undefined($;$) {
return unless defined( $_[0] );
require Carp;
&Carp::confess( _fail_msg($_[1]) );
}
Thanks so much.
--
benh~