aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Category.pm
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-09-04 23:05:48 +0200
committerAngelo Naselli <anaselli@linux.it>2014-09-04 23:05:48 +0200
commit791f736950dd63ff239e7fd743f4675ccb9c865f (patch)
tree6b1f9ed4878fc91008d0d2d2274cbc4ed7ce11ea /lib/AdminPanel/Category.pm
parentbbb1d76c94e634bedc3a2243a32448ba5b961b81 (diff)
downloadcolin-keep-791f736950dd63ff239e7fd743f4675ccb9c865f.tar
colin-keep-791f736950dd63ff239e7fd743f4675ccb9c865f.tar.gz
colin-keep-791f736950dd63ff239e7fd743f4675ccb9c865f.tar.bz2
colin-keep-791f736950dd63ff239e7fd743f4675ccb9c865f.tar.xz
colin-keep-791f736950dd63ff239e7fd743f4675ccb9c865f.zip
Cleaned constructor code
Diffstat (limited to 'lib/AdminPanel/Category.pm')
-rw-r--r--lib/AdminPanel/Category.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AdminPanel/Category.pm b/lib/AdminPanel/Category.pm
index 825e6cd..63c23b1 100644
--- a/lib/AdminPanel/Category.pm
+++ b/lib/AdminPanel/Category.pm
@@ -51,10 +51,10 @@ use yui;
sub new {
my ($class, $newName, $newIcon) = @_;
my $self = {
- my $name = 0,
- my $button = 0,
- my $icon = 0,
- my $modules = 0
+ name => 0,
+ button => 0,
+ icon => 0,
+ modules => [],
};
bless $self, 'AdminPanel::Category';
@@ -128,7 +128,7 @@ sub moduleLoaded {
my $present = 0;
- if (!$module_name) {
+ if (!$module_name || ! $self->{modules}) {
return $present;
}