diff options
author | doy <doy@tozt.net> | 2009-04-26 23:39:02 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2009-04-26 23:39:02 -0500 |
commit | e1d0030f8d0501f7d30a9bdeb1d0e13fc39c2d35 (patch) | |
tree | fa2fe5117b014cfb94b4e5c1d07c2616978d40c6 | |
parent | 18e674a5eddf7618cf6a2f42be2da498760bd508 (diff) | |
download | bot-games-e1d0030f8d0501f7d30a9bdeb1d0e13fc39c2d35.tar.gz bot-games-e1d0030f8d0501f7d30a9bdeb1d0e13fc39c2d35.zip |
return early in a few more places
-rw-r--r-- | lib/Bot/Games/Trait/Attribute/Formatted.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Bot/Games/Trait/Attribute/Formatted.pm b/lib/Bot/Games/Trait/Attribute/Formatted.pm index c039fc7..b94e887 100644 --- a/lib/Bot/Games/Trait/Attribute/Formatted.pm +++ b/lib/Bot/Games/Trait/Attribute/Formatted.pm @@ -36,11 +36,13 @@ after _process_options => sub { my $class = shift; my ($name, $options) = @_; return if exists $options->{formatter}; + return unless $options->{command}; if (exists $options->{type_constraint}) { my $tc = $options->{type_constraint}; for my $tc_type (keys %default_formatters) { if ($tc->is_a_type_of($tc_type)) { $options->{formatter} = $default_formatters{$tc_type}; + return; } } } |