version => '1,Version',
build => '1,Build',
believe => '1,Believable nodes,parray',
+ lastping => '1,Last Ping at,ptimelist',
);
#no strict;
my $self = shift;
my $call = uc shift;
$self->{believe} ||= [];
- push @{$self->{believe}}, $call;
+ push @{$self->{believe}}, $call unless grep $_ eq $call, @{$self->{believe}};
}
sub unset_believe
delete $self->{believe} unless @{$self->{believe}};
}
}
+
+sub believe
+{
+ my $self = shift;
+ return exists $self->{believe} ? @{$self->{believe}} : ();
+}
+
+sub lastping
+{
+ my $self = shift;
+ my $call = shift;
+ $self->{lastping} ||= {};
+ $self->{lastping} = {} unless ref $self->{lastping};
+ my $b = $self->{lastping};
+ $b->{$call} = shift if @_;
+ return $b->{$call};
+}
1;
__END__