--- On Mon, 9/11/09, Ovid <publiustemp-perl...@yahoo.com> wrote: > From: Ovid <publiustemp-perl...@yahoo.com>
> The *only* use I've ever had for use_ok() has been in a > t/00-load.t test which attempts to load all modules and does > a BAIL_OUT if it fails. I'm sure there are other use > cases, but if that's the only one, it seems a very, very > slim justification for a fragile code. Thinking about this more, what about a compile_ok()? It merely asserts that the code compiles (in an anonymous namespace, perhaps?), but doesn't make any guarantees about you being able to even use the code -- just that it compiles. It wouldn't need to be done at BEGIN time, nor would it necessarily require a "or die" after it, since its availability is not guaranteed (though that would be problematic as cleaning a namespace is also fragile). Just tossing out ideas here. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6