To add to what
LanX said,
eval effectively hides any errors that might occur when executing what's in the block.
Since this is a
.pl file and
require happens at
runtime, you may get away with just checking if this file contains some expected characteristics before calling
require - like actually existing (or containing some expected text). That said, it's better practice to create an actual Perl module and esure it can be found via
@INC (i.e., via
PERLLIB,
PERL5LIB, or judicious use of
FindBin +
use lib ....