diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-05-05 16:42:30 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-05-05 16:42:30 +0200 |
commit | 138a40048107e5aac97b61201c801091bc559aa0 (patch) | |
tree | 11aca575661eeba7850d4a2bed977222b91ab789 | |
parent | d21ad1026d9a3545be89bd7d714c3b6a74bb4bf2 (diff) | |
download | manatools-138a40048107e5aac97b61201c801091bc559aa0.tar manatools-138a40048107e5aac97b61201c801091bc559aa0.tar.gz manatools-138a40048107e5aac97b61201c801091bc559aa0.tar.bz2 manatools-138a40048107e5aac97b61201c801091bc559aa0.tar.xz manatools-138a40048107e5aac97b61201c801091bc559aa0.zip |
Set icon and title into Module base class, to avoid doing that for any
modules
-rw-r--r-- | lib/ManaTools/Module.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/ManaTools/Module.pm b/lib/ManaTools/Module.pm index 678b6a9a..22887009 100644 --- a/lib/ManaTools/Module.pm +++ b/lib/ManaTools/Module.pm @@ -179,7 +179,30 @@ sub create { return $obj; } +#============================================================= + +=head2 BUILD + +=head3 INPUT + + $self: this object + +=head3 DESCRIPTION + The BUILD method is called after a Moose object is created, + base Module class sets title and icon + +=cut + +#============================================================= +sub BUILD { + my $self = shift; + + ## set title + yui::YUI::app()->setApplicationTitle($self->name) if $self->name; + ## set icon + yui::YUI::app()->setApplicationIcon($self->icon) if $self->icon; +} #============================================================= |