Skip to content

Commit

Permalink
A few tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarrod committed Jul 30, 2011
1 parent da1905b commit 47c259e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.pod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Elegant. Simple. Probably compiles.

#Roles can let you break up large event handler modules into smaller ones.
role ExtraAnnoying {
had %enemies = ('bob', 'sam', 'chanserv') X=> 1;
has %enemies = ('bob', 'sam', 'chanserv') X=> 1;
#Magical type constraints only let this event be called when $e.who is an enemy
multi method said ($e where {.who<nick> ~~ %enemies}) {
$e.reply($e.msg); #Parrot back what was said;
Expand Down
3 changes: 2 additions & 1 deletion lib/Net/IRC/Bot.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ class Net::IRC::Bot {
has $debug = False;

#State variables.
#TODO: Make this an object for cleaner syntax.
has %state;

submethod BUILD {
callsame;
@modules.push(Net::IRC::DefaultHandlers.new);
}

method !resetstate() {
%state = (
nick => $nick,
Expand Down

0 comments on commit 47c259e

Please sign in to comment.