On Thu, Apr 08, 2004 at 10:56:06AM -0700, Stas Bekman wrote: > Yes, I'm aware of this problem too. I sometimes use a different workaround. > Using Geoff's one liner:
OK, I'll use this method. > Also William can you check what Test::More does to deal with this problem? > Eventually we may drop t_cmp completely and move into Test::More, whose API > is much reacher and you better use it from the very beginning instead of > Apache::TestUtil, if you can afford requiring Test::More. All tests in the following script pass: --------------------------------- use Test::More tests => 2; # Test scripts for Stas is ( undef, &get_undef, "Retrieve undef from subroutine" ); my $rv = &get_undef; is ( undef, $rv, "Retrieve undef from subroutine - use variable for comparison" ); sub get_undef { return; } --------------------------------- I like that idea of adopting all of T::M. However, does T::M have a comparable function to t_cmp that gives the expected and received values? I *really* like the verbose output that t_cmp gives! William -- Knowmad Services Inc. http://www.knowmad.com