2 # Investigate whether an external node is accessible
4 # If it is, make it believable otherwise mark as not
7 # It is possible to store up state for a node to be
8 # investigated, so that if it is accessible, its details
9 # will be passed on to whomsoever might be interested.
11 # Copyright (c) 2004 Dirk Koopman, G1TLH
24 use vars qw($VERSION $BRANCH);
25 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
26 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
27 $main::build += $VERSION;
28 $main::branch += $BRANCH;
30 use vars qw (%list %valid);
32 %list = (); # the list of outstanding investigations
33 %valid = ( # valid fields
35 start => '0,Started at,atime',
36 version => '0,Node Version',
37 build => '0,Node Build',
38 here => '0,Here?,yesno',
39 conf => '0,In Conf?,yesno',
47 my $self = $list{$call} || bless { call=>$call, start=>$main::systime }, ref($pkg) || $pkg;
60 return if $name =~ /::DESTROY$/;
63 confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
65 # this clever line of code creates a subroutine which takes over from autoload
66 # from OO Perl - Conway
67 *$AUTOLOAD = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}};