diff options
Diffstat (limited to 'lib/Bot/Games/Trait/Method')
-rw-r--r-- | lib/Bot/Games/Trait/Method/Command.pm | 24 | ||||
-rw-r--r-- | lib/Bot/Games/Trait/Method/Formatted.pm | 22 |
2 files changed, 0 insertions, 46 deletions
diff --git a/lib/Bot/Games/Trait/Method/Command.pm b/lib/Bot/Games/Trait/Method/Command.pm deleted file mode 100644 index 25bd2ff..0000000 --- a/lib/Bot/Games/Trait/Method/Command.pm +++ /dev/null @@ -1,24 +0,0 @@ -package Bot::Games::Trait::Method::Command; -use Bot::Games::OO::Role; - -has pass_args => ( - is => 'rw', - isa => 'Bool', - default => 1, -); - -has needs_init => ( - is => 'rw', - isa => 'Bool', - default => 1, -); - -around execute => sub { - my $orig = shift; - my $self = shift; - return $self->pass_args ? $self->$orig(@_) : $self->$orig($_[0]); -}; - -no Bot::Games::OO::Role; - -1; diff --git a/lib/Bot/Games/Trait/Method/Formatted.pm b/lib/Bot/Games/Trait/Method/Formatted.pm deleted file mode 100644 index cdd4c60..0000000 --- a/lib/Bot/Games/Trait/Method/Formatted.pm +++ /dev/null @@ -1,22 +0,0 @@ -package Bot::Games::Trait::Method::Formatted; -use Bot::Games::OO::Role; - -has formatter => ( - is => 'rw', - isa => 'CodeRef', - default => sub { sub { - warn "no formatter specified!"; - return @_; - } }, -); - -sub _munge_formatter { - my $self = shift; - my ($format) = @_; - return $format if ref($format) eq 'CODE'; - return $self->associated_metaclass->formatter_for($format); -} - -no Bot::Games::OO::Role; - -1; |