aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ManaTools/Module.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ManaTools/Module.pm b/lib/ManaTools/Module.pm
index ee2a8bb9..d4f2eb0f 100644
--- a/lib/ManaTools/Module.pm
+++ b/lib/ManaTools/Module.pm
@@ -51,8 +51,16 @@ use yui;
has 'icon' => (
is => 'rw',
isa => 'Str',
+ lazy => 1,
+ builder => '_iconInitializer',
);
+sub _iconInitializer {
+ my $self = shift;
+
+ return File::ShareDir::dist_file(ManaTools::Shared::distName(), sprintf('images/%s.png', $self->name())),
+}
+
#=============================================================
=head2 name