in reply to use_ok output

I'm confused. Are you trying to capture of use_ok('Somemodule') (which doesn't make much sense) or of use Somemodule;?

If it's the latter, and if you mean "exception" when you say "output", then

my $output = eval("use Somemodule; 1") ? '' : $@;

Replies are listed 'Best First'.
Re^2: use_ok output
by hughbar (Initiate) on Sep 16, 2011 at 18:28 UTC
    Just to expand on the question. I have an install checker for my application. This needs a series of modules and the checker needs to find out whether they are on the target system. However I'm trying to make it as simple as possible, so I don't want to use extra non-core modules for this, for example or modify modules.

    Thanks for all the replies. Actually, testing the modules via eval and giving up on use_ok looks promising.