From 44c486357eecf234776913d2ba3ab636fd481eb0 Mon Sep 17 00:00:00 2001 From: Tomas Plesnik <plesnik@ics.muni.cz> Date: Tue, 27 Jan 2015 14:24:32 +0100 Subject: [PATCH] pridano nacitani adresare lib a modulu WardenClient.pm pomoci promenne __FILE__ --- src/warden-client/bin/receiver.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/warden-client/bin/receiver.pl b/src/warden-client/bin/receiver.pl index 696ecab..b9d4542 100755 --- a/src/warden-client/bin/receiver.pl +++ b/src/warden-client/bin/receiver.pl @@ -7,6 +7,8 @@ use strict; use warnings; +use File::Basename; + #------------------------------------------------------------------------------ # Warden 2.2 Client, Receiver, Example # @@ -18,11 +20,10 @@ 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/WardenClient.pm'; +# Load Warden client library and use main module +my $bin = File::Basename::dirname(__FILE__); +use lib "$bin/../lib"; +use WardenClient; # Definition of requested event type. This attributes is also set on server # and must not change. -- GitLab