diff options
-rw-r--r-- | lib/Bot/Games/Meta/Role/Attribute.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Bot/Games/Meta/Role/Attribute.pm b/lib/Bot/Games/Meta/Role/Attribute.pm index e9d4d2d..65d11f5 100644 --- a/lib/Bot/Games/Meta/Role/Attribute.pm +++ b/lib/Bot/Games/Meta/Role/Attribute.pm @@ -14,6 +14,13 @@ has needs_init => ( default => 1, ); +before _process_options => sub { + my $self = shift; + my ($name, $options) = @_; + warn "needs_init is useless for attributes without command" + if exists($options->{needs_init}) && !$options->{command}; +}; + around accessor_metaclass => sub { my $orig = shift; my $self = shift; |