Permalink
Browse files

Tweak the @modules logic, thanks to TonyC ( it might not be perfect b…

…ut good enough for now )
  • Loading branch information...
Larwan Berke
Larwan Berke committed Mar 3, 2010
1 parent fa274bb commit 3c012546513439c28e9473c223fae843381ffc44
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/POE.pm
View
@@ -11,14 +11,14 @@ $VERSION = '1.287'; # NOTE - Should be #.### (three decimal places)
sub import {
my $self = shift;
- my @loops = grep(/^(?:XS\:\:)?Loop\:\:/, @_);
+ my @loops = grep(/^(?:XS::)?Loop::/, @_);
my @sessions = grep(/^(Session|NFA)$/, @_);
- my @modules = grep(!/^(Kernel|Session|NFA|Loop|XS)$/, @_);
+ my @modules = grep(!/^(Kernel|Session|NFA|(?:XS::)?Loop::[\w:]+)$/, @_);
croak "can't use multiple event loops at once"
if (@loops > 1);
croak "POE::Session and POE::NFA export conflicting constants"
- if grep(/^(Session|NFA)$/, @sessions) > 1;
+ if scalar @sessions > 1;
# If a session was specified, use that. Otherwise use Session.
if (@sessions) {

0 comments on commit 3c01254

Please sign in to comment.