diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-12-28 17:54:11 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-12-28 17:54:11 +0100 |
commit | aa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59 (patch) | |
tree | 7ba0aba9eab3474e228c9f2185cdd1ecd2059db9 | |
parent | 1e7fc2d410509bd90a299bcfe48a00168478426b (diff) | |
download | manatools-aa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59.tar manatools-aa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59.tar.gz manatools-aa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59.tar.bz2 manatools-aa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59.tar.xz manatools-aa5f049ffd9d7d94d7034dc30b1e7e04e8d90a59.zip |
used logging role
-rw-r--r-- | lib/ManaTools/Module/Users.pm | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/lib/ManaTools/Module/Users.pm b/lib/ManaTools/Module/Users.pm index 6594ad67..799e643f 100644 --- a/lib/ManaTools/Module/Users.pm +++ b/lib/ManaTools/Module/Users.pm @@ -85,6 +85,20 @@ use MDK::Common::DataStructure qw(member); use feature 'state'; extends qw( ManaTools::Module ); +with 'ManaTools::LoggingRole'; +has 'configDir' => ( + is => 'ro', + isa => 'Str', +); + +with 'ManaTools::ConfigDirRole'; + +has 'moduleName' => ( + is => 'ro', + isa => 'Str', + init_arg => undef, + default => 'manauser', +); has '+icon' => ( default => File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/manauser.png'), @@ -192,7 +206,57 @@ has 'config_file' => ( default => '/etc/sysconfig/manauser', ); +#============================================================= + +=head2 identifier + +=head3 INPUT + + $self: this object + +=head3 OUTPUT + + name: module name + +=head3 DESCRIPTION + + Returns the module name as logging identifier. + This method is required by LoggingRole + +=cut + +#============================================================= +sub identifier { + my $self = shift; + + return $self->moduleName(); +} + +#============================================================= + +=head2 configName + +=head3 INPUT + + $self: this object + +=head3 OUTPUT + + name: module name + +=head3 DESCRIPTION + + Returns the module name as configuration subdirectory. + This method is required by ConfifDirRole +=cut + +#============================================================= +sub configName { + my $self = shift; + + return $self->moduleName(); +} #============================================================= @@ -2517,6 +2581,7 @@ sub _manageUsersDialog { elsif ($eventType == $yui::YEvent::MenuEvent) { ### MENU ### my $item = $event->item(); + $DB::single = 1; my $menuLabel = $item->label(); if ($menuLabel eq $fileMenu{ quit }->label()) { last; |