Browse files

forward module exports to the package using POE directly

  • Loading branch information...
1 parent b0e5ca7 commit 8429c0a9b4cdc74ae3c8f6a04e9752a37246bd1d @rcaputo committed Jan 15, 1999
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/POE.pm
View
6 lib/POE.pm
@@ -22,9 +22,13 @@ sub import {
my @modules = grep(!/^(Kernel|Session)$/, @_);
unshift @modules, qw(Kernel Session);
+ my $package = (caller())[0];
+
my @failed;
foreach my $module (@modules) {
- unless (eval("require POE::$module")) {
+ my $code = "package $package; use POE::$module;";
+ eval($code);
+ if ($@) {
warn $@;
push(@failed, $module);
}

0 comments on commit 8429c0a

Please sign in to comment.