Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set %ENV<ME> variable only when actually required
  • Loading branch information
AlexDaniel committed Feb 13, 2016
1 parent 5eabe3e commit e600617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion evalbot.pl
Expand Up @@ -216,13 +216,13 @@ package Evalbot;
my $address = $info->{address} // '';
return if $info->{who} =~ m/^(dalek|preflex|yoleaux).?$/;
$message =~ s//\n/g;
$ENV{ME} = $info->{who};

if ($message =~ m/^camelia:/) {
return "Usage: " . join(',', sort keys %impls) . ': $code';
} elsif ($message =~ m/\A$regex\s*(.*)\z/s){
my ($eval_name, $str) = ($1, $2);
return "Program empty" unless length $str;
$ENV{ME} = $info->{who};
if (ref $aliases{$eval_name}) {
warn "$info->{channel} <$info->{who}> Perl6: $str\n";
my %results;
Expand Down

0 comments on commit e600617

Please sign in to comment.