Apache-Wombat
view release on metacpan or search on metacpan
lib/Apache/Wombat/Connector.pm view on Meta::CPAN
=back
=cut
sub start {
my $self = shift;
if ($self->{started}) {
my $msg = "start: connector already started";
Wombat::LifecycleException->throw($msg);
}
$self->{started} = 1;
$self->log(sprintf("%s started", $self->getName()), undef, 'INFO');
return 1;
}
=pod
lib/Apache/Wombat/Connector.pm view on Meta::CPAN
=back
=cut
sub stop {
my $self = shift;
unless ($self->{started}) {
my $msg = "stop: connector not started";
Wombat::LifecycleException->throw($msg);
}
undef $self->{started};
$self->debug(sprintf("%s stopped", $self->getName()));
return 1;
}
# private methods
lib/Apache/Wombat/FileLogger.pm view on Meta::CPAN
sub start {
my $self = shift;
$self->SUPER::start();
# ungh dum
undef $self->{started};
$self->{fh} = Apache::LogFile->new($self->{filename}) or do {
my $msg = "cannot open $self->{filename}";
throw Wombat::LifecycleException->new($msg, $!);
};
$self->{started} = 1;
return 1;
}
=pod
=item stop()
lib/Apache/Wombat/FileLogger.pm view on Meta::CPAN
=cut
# sub stop {
# my $self = shift;
# $self->SUPER::stop();
# $self->{fh}->close or do {
# my $msg = "cannot close $self->{filename}";
# throw Wombat::LifecycleException->new($msg, $!);
# };
# return 1;
# }
1;
__END__
=pod
( run in 0.245 second using v1.01-cache-2.11-cpan-496ff517765 )