# search local then perl directories
BEGIN {
# root of directory tree for this system
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
# search local then perl directories
BEGIN {
# root of directory tree for this system
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
$conn = IntMsg->connect($clusteraddr, $clusterport, rproc => \&rec_socket);
$conn->{on_connect} = \&on_connect;
$conn->{on_disconnect} = \&on_disconnect;
$conn = IntMsg->connect($clusteraddr, $clusterport, rproc => \&rec_socket);
$conn->{on_connect} = \&on_connect;
$conn->{on_disconnect} = \&on_disconnect;