From 7a0555f3f94cc947b8cf05a0c95bf503032cb37e Mon Sep 17 00:00:00 2001
From: Tomas Plesnik <plesnik@ics.muni.cz>
Date: Tue, 27 Jan 2015 14:23:19 +0100
Subject: [PATCH] pridano nacitani adresare lib a modulu WardenClient.pm pomoci
 promenne __FILE__

---
 src/warden-client/bin/info.pl | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/warden-client/bin/info.pl b/src/warden-client/bin/info.pl
index fff04f9..d7137da 100755
--- a/src/warden-client/bin/info.pl
+++ b/src/warden-client/bin/info.pl
@@ -7,6 +7,8 @@
 use strict;
 use warnings;
 
+use File::Basename;
+
 #------------------------------------------------------------------------------
 # Warden 2.2 Client, Info, Example
 #
@@ -18,12 +20,12 @@ use warnings;
 #------------------------------------------------------------------------------
 # This code should developer add into his/her application.
 
-# Path to warden-client directory
-my $warden_path = '/opt/warden-client/';
-
-# Inclusion of warden-client receiving functionality
-require $warden_path . '/lib/WardenClientCommon.pm';
+# Load Warden client library and use main module
+my $bin = File::Basename::dirname(__FILE__);
+use lib "$bin/../lib";
+use WardenClient;
 
+# obtain information about already registered clients
 my @clients = WardenClient::getClientInfo() or exit 1; # receive data or exit
 
 print "+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n";
-- 
GitLab