On Sat, 11 Aug 2001 23:15:30 -0400
Michael G Schwern <[EMAIL PROTECTED]> wrote:
> Announcing Test::Simple 0.11. The big thing here is you can have
> tests like: is( $foo, undef ); and it won't spit at you for using
> uninitialized values.
>
> 0.11 Sat Aug 11 23:05:19 EDT 2001
> * Will no longer warn about testing undef values
> - Escaping # in test names
> - Ensuring that ok() returns true or false and not undef
> - Minor doc typo in the example
It doesn't pass make tests here, with 5.005_03. Patch follows.
--- lib/Test/More.pm~ Sat Aug 11 07:41:32 2001
+++ lib/Test/More.pm Tue Aug 14 18:34:41 2001
@@ -665,13 +665,20 @@
$ok = 1;
}
else {
- if( UNIVERSAL::isa($e1, 'ARRAY') and
- UNIVERSAL::isa($e2, 'ARRAY') )
- {
+ my($is_array, $is_hash);
+ {
+ # Shut up uninitalized value warning, again.
+ local $^W = 0;
+ $is_array = UNIVERSAL::isa($e1, 'ARRAY')
+ && UNIVERSAL::isa($e2, 'ARRAY');
+ $is_hash = UNIVERSAL::isa($e1, 'HASH')
+ && UNIVERSAL::isa($e2, 'HASH');
+ }
+ if( $is_array )
+ {
$ok = eq_array($e1, $e2);
}
- elsif( UNIVERSAL::isa($e1, 'HASH') and
- UNIVERSAL::isa($e2, 'HASH') )
+ elsif( $is_hash )
{
$ok = eq_hash($e1, $e2);
}
--
Tatsuhiko Miyagawa
mailto:[EMAIL PROTECTED] http://bulknews.net/lib/