If we didn't find a class, an exception was thrown.
}
sub load_first_existing_class {
- my @classes = @_;
+ my @classes = @_
+ or return;
foreach my $class (@classes) {
unless ( _is_valid_class_name($class) ) {
}
}
- if ($found) {
- return get_metaclass_by_name($found) || $found;
- }
+ return get_metaclass_by_name($found) || $found
+ if $found;
confess join(
"\n",
$exceptions{$_}
)
} @classes
- ) if keys %exceptions;
+ );
}
sub _try_load_one_class {