in reply to Re: The 'eval "require $module; 1"' idiom
in thread The 'eval "require $module; 1"' idiom

Even in that case, I still wouldn't add ";1" to the evaluated string. In your example, use warnings would be complaining about concatenating an undefined value. Instead I'd probably go with

my $MODULE_WAS_LOADED = !! eval "require 'bar.pl'";

Or perhaps even:

my $MODULE_WAS_LOADED = 0+!! eval "require 'bar.pl'";

(which might look nicer in the debugging output).

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name