aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/AdminPanel/Shared.pm23
-rw-r--r--t/03-Shared_GUI.t2
2 files changed, 25 insertions, 0 deletions
diff --git a/lib/AdminPanel/Shared.pm b/lib/AdminPanel/Shared.pm
index f435c6a..6eb6edb 100644
--- a/lib/AdminPanel/Shared.pm
+++ b/lib/AdminPanel/Shared.pm
@@ -86,6 +86,7 @@ our @EXPORT = qw(
trim
md5sum
pathList2hash
+ distName
);
@@ -98,6 +99,28 @@ Version 0.01
our $VERSION = '0.01';
+#=============================================================
+
+=head2 distName
+
+=head3 OUTPUT
+
+$distname: name of the distributed package
+
+=head3 DESCRIPTION
+
+This function return the distname, useful to retrieve data
+with File::ShareDir::dist_file and must be the same as into
+Makefile.PL (e.g. adminpanel)
+
+=cut
+
+#=============================================================
+
+sub distName {
+ return "adminpanel";
+}
+
#=============================================================
diff --git a/t/03-Shared_GUI.t b/t/03-Shared_GUI.t
index f4ac300..57a24be 100644
--- a/t/03-Shared_GUI.t
+++ b/t/03-Shared_GUI.t
@@ -9,6 +9,8 @@ BEGIN {
use_ok( 'AdminPanel::Shared' ) || print "AdminPanel::Shared failed!\n";
}
+ is (AdminPanel::Shared::distName(), 'adminpanel', 'distname');
+
ok( my $gui = AdminPanel::Shared::GUI->new(), 'create');
diag "\n\nNext tests will create some gui dialogs";