From 9c7b213f58fe533953953e90b5bc77087ca4d45d Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 13 Jul 2018 18:52:08 +0100 Subject: we can now parse boolean options --- lib/Getopt/Dakkar/Role/Piece.pm | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lib/Getopt/Dakkar/Role/Piece.pm') diff --git a/lib/Getopt/Dakkar/Role/Piece.pm b/lib/Getopt/Dakkar/Role/Piece.pm index 81c89e7..5b7609d 100644 --- a/lib/Getopt/Dakkar/Role/Piece.pm +++ b/lib/Getopt/Dakkar/Role/Piece.pm @@ -12,20 +12,4 @@ has matching_strings => ( ); sub _build_matching_strings($self) { [ $self->name, $self->aliases->@* ] } -has class => ( is => 'ro', isa => ClassName, default => 'Getopt::Dakkar::Stash' ); -has object => ( is => 'ro', isa => Object ); -has op => ( is => 'ro', isa => Str|CodeRef ); - -sub make_stash($self,$argpack) { - if (my $o = $self->object) { return $o } - - my $class = use_module($self->class); - if (my $from_argpack = $class->can('new_from_argpack')) { - return $class->$from_argpack($argpack); - } - else { - return $class->new(); - } -} - requires qw(parse match); -- cgit v1.2.3