diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-11-23 15:22:40 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-11-23 15:22:40 +0100 |
commit | 85c13ee6070cf4086ffc73628e25a438f807f543 (patch) | |
tree | b25b9fb30befdb12920660f176e3c18bd3ba5b63 | |
parent | 2c30b87cbb87f65ad229d61606b1bf00be86ea57 (diff) | |
download | manatools-85c13ee6070cf4086ffc73628e25a438f807f543.tar manatools-85c13ee6070cf4086ffc73628e25a438f807f543.tar.gz manatools-85c13ee6070cf4086ffc73628e25a438f807f543.tar.bz2 manatools-85c13ee6070cf4086ffc73628e25a438f807f543.tar.xz manatools-85c13ee6070cf4086ffc73628e25a438f807f543.zip |
Added commandline attribute to Module
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | lib/ManaTools/Module.pm | 25 |
2 files changed, 27 insertions, 0 deletions
@@ -1,3 +1,5 @@ + - Added CommandLine attribute to Module, to make it available + for all the GUI modules. - Added CommandLine module to manage common CL options - Added event_timeout rw attribute to GUI::Dialog to allow manage $yui::YEvent::TimeoutEvent diff --git a/lib/ManaTools/Module.pm b/lib/ManaTools/Module.pm index a53b97ea..bf7eeb60 100644 --- a/lib/ManaTools/Module.pm +++ b/lib/ManaTools/Module.pm @@ -26,6 +26,7 @@ use Moose; use ManaTools::Shared; use ManaTools::Shared::Locales; use ManaTools::Shared::Logging; +use ManaTools::Shared::GUI::CommandLine; =head1 VERSION @@ -147,6 +148,30 @@ sub _loggerInitialize{ return ManaTools::Shared::Logging->new(ident => $self->name); } + +#============================================================= + +=head2 commandline + + commandline attribute defines the given command line, if + --help is passed help message is shown and the module is not + loaded. + See ManaTools::Shared::GUI::CommandLine for details and usage. + +=cut + +#============================================================= +has 'commandline' => ( + is => 'ro', + isa => 'ManaTools::Shared::GUI::CommandLine', + init_arg => undef, + default => sub { + return ManaTools::Shared::GUI::CommandLine->new_with_options(); + } +); + + + #============================================================= =head1 SUBROUTINES/METHODS |