summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2018-07-13 13:12:03 +0100
committerdakkar <dakkar@thenautilus.net>2018-07-13 13:12:03 +0100
commitefed09f4b552e5599bde4a3bc4f8948a08519d70 (patch)
tree441791c65fe77d885753980d2902d4856ceb04d7
parentvaguely parse commands (diff)
downloadGetopt-Dakkar-efed09f4b552e5599bde4a3bc4f8948a08519d70.tar.gz
Getopt-Dakkar-efed09f4b552e5599bde4a3bc4f8948a08519d70.tar.bz2
Getopt-Dakkar-efed09f4b552e5599bde4a3bc4f8948a08519d70.zip
pieces have names
-rw-r--r--lib/Getopt/Dakkar.pm2
-rw-r--r--lib/Getopt/Dakkar/Role/Piece.pm1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/Getopt/Dakkar.pm b/lib/Getopt/Dakkar.pm
index b43c24e..f35147b 100644
--- a/lib/Getopt/Dakkar.pm
+++ b/lib/Getopt/Dakkar.pm
@@ -6,4 +6,4 @@ use Module::Runtime qw(use_module);
with 'Getopt::Dakkar::Role::Command';
-1;
+has '+name' => ( default => $0 );
diff --git a/lib/Getopt/Dakkar/Role/Piece.pm b/lib/Getopt/Dakkar/Role/Piece.pm
index d981095..144f9e7 100644
--- a/lib/Getopt/Dakkar/Role/Piece.pm
+++ b/lib/Getopt/Dakkar/Role/Piece.pm
@@ -3,6 +3,7 @@ use Getopt::Dakkar::Style qw(role);
# VERSION
# ABSTRACT: a piece
+has name => ( is => 'ro', isa => Str, required => 1 );
has class => ( is => 'ro', isa => ClassName, default => 'Getopt::Dakkar::Stash' );
has object => ( is => 'ro', isa => Object );
has op => ( is => 'ro', isa => Str|CodeRef );