Skip to content

Commit

Permalink
propagate error messages from modules to user
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaputo committed Jan 15, 1999
1 parent 491c376 commit babfbeb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/POE.pm
Expand Up @@ -24,8 +24,10 @@ sub import {

my @failed;
foreach my $module (@modules) {
eval("require POE::$module")
or push(@failed, $module);
unless (eval("require POE::$module")) {
warn $@;
push(@failed, $module);
}
}

@failed and croak "could not import qw(" . join(' ', @failed) . ")";
Expand Down

0 comments on commit babfbeb

Please sign in to comment.