]> ruin.nu Git - NDIRC.git/blobdiff - Command.pm
New infrastructure for commands with basic commands converted
[NDIRC.git] / Command.pm
index e38ba131f5211f6c3712163b5195029d9fadcb79..62429366c3cf946280f44b77e4fc4117ebffaf74 100644 (file)
@@ -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;