in reply to Testing if machine has LWP... not working
No need. eval returns undef on expection. Otherwise, it returns true because of the 1;. It would return true even without the 1; because require always returns true or an exception.
Incidentally, eval EXPR is not needed here. eval BLOCK suffices.
if (eval { require LWP::UserAgent }) [download]