diff --git a/src/warden-client/bin/info.pl b/src/warden-client/bin/info.pl index fff04f9c81feee8427b0ff6304ae6f0aae14293e..d7137dab8ea7bb7c646f1a11b4b9ab7358aea4a6 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";