On Tue, May 01, 2012 at 08:40:16PM -0400, Caleb Cushing via RT wrote:
Show quoted text> I'd like to set a function that would allow me to write
>
> my $class = load_class_ok('Class::Foo'); # or throw exception with
> the original error message
>
> perhaps it'd have to be in some kind of Test::Class::Load or
> something, but this would be useful for test suites. If it's desired
> perhaps I can take a crack at implementation.
How is this any different from load_class()? If the only difference is
that it returns the class name, I don't think that load_class_ok() is a
reasonable name for it (_ok typically implies a testing function of some
sort), and I also don't really see why it needs to be a separate
function. If that isn't the only difference, you should explain the
differences better.
-doy