X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Command.pm;h=62429366c3cf946280f44b77e4fc4117ebffaf74;hb=8d103256e7f29d892d040ec25a38b2cb56e7f942;hp=e38ba131f5211f6c3712163b5195029d9fadcb79;hpb=4f1948e0fe10075464732db5cc2168207c00c7aa;p=NDIRC.git diff --git a/Command.pm b/Command.pm index e38ba13..6242936 100644 --- a/Command.pm +++ b/Command.pm @@ -25,37 +25,30 @@ use Moose; has acl => ( is => 'ro', - isa => 'ArrayRef[Str]', + isa => 'Str', predicate => 'has_acl', ); has type => ( is => 'ro', - isa => 'ArrayRef[Str]', - default => sub { ['pub'] }, + isa => 'Str', + default => 'pub', ); has help => ( - is => 'ro', - isa => 'ArrayRef[Str]', - default => sub{ ['No help for this command'] }, -); - -has name => ( is => 'ro', isa => 'Str', default => 'No help for this command', ); -has func => ( +has name => ( is => 'ro', - isa => 'CodeRef', + isa => 'Str', required => 1, ); sub execute { my ($self,$c,$args) = @_; - $self->func->(@_); } 1;