( my $file= $class ) =~ s-::|'-/-g; if( ! eval { require "$file.pm"; 1 } ) { # work-around the failure here }