Watchdog

 view release on metacpan or  search on metacpan

Base.pm  view on Meta::CPAN


=head1 OBJECT METHODS

=head2 id()

Return a string describing the name of a service and the host (and
optionally the port) on which it runs.

=cut

sub id() {
  my $self = attr shift;
  my $id = "$NAME\@$HOST";
  $id .= ":$PORT" if defined($PORT);
  $id .= "/$FILE" if ($FILE eq '');
  return $id;
}

#------------------------------------------------------------------------------

=head1 AUTHOR

Mysql.pm  view on Meta::CPAN

#------------------------------------------------------------------------------

=head1 OBJECT METHODS

=head2 id()

Return a string describing the Mysql service.

=cut

sub id() {
  my $self = attr shift;
  return $self->SUPER::id . ":$DB";
}

#------------------------------------------------------------------------------

=head2 is_alive()

Returns (1,undef) if the mysql server can be 'pinged' or (0,I<$error>)
where I<$error> is a DBI error string if it can't.



( run in 2.561 seconds using v1.01-cache-2.11-cpan-d7f47b0818f )