Fortunately both IO::File (core module) & Path::Class don't do this:
use IO::File;
my $fh = IO::File->new( $config->{file_path}, 'r' )
or die "can't open $config->{file_path}: $!";
use Path::Class qw<file>;
my $fh = file( $config->{file_path} )->openr;
Both above spot the undef gotcha. NB. And ->openr() throws an exception.ref: https://metacpan.org/module/IO::File | https://metacpan.org/module/Path::Class