- my $newstate = $states{ord($line)};
-
- # disallowed transitions
- $_ = "$this->{state} $newstate";
- unless (/^(go|go-nox|html) kill-end$/ or
- /^(kill-init|kill-end) (incoming-recv|autocheck|recips|html)$/ or
- /^kill-body go$/) {
- die "transition from $this->{state} to $newstate at $this->{linenum} disallowed";
- }
-
- $this->{state} = $newstate;
- if ($this->{state} =~ /^(autocheck|recips|html|incoming-recv)$/) {
- $record->{type} = $this->{state};
- $record->{start} = $logfh->tell;
- $record->{stop} = $logfh->tell;
- $record->{inner_file} = $this->{inner_file};
- } elsif ($this->{state} eq 'kill-end') {
- if ($this->{inner_file}) {
- $record->{fh} = IO::InnerFile->new($logfh,$record->{start},$record->{stop} - $record->{start})
- }
+ $this->state_transition($states{ord($line)});
+ if ($this->state =~ /^(autocheck|recips|html|incoming-recv)$/) {
+ $record->{type} = $this->state;
+ $record->{start} = $logfh->tell;
+ $record->{stop} = $logfh->tell;
+ $record->{inner_file} = $this->inner_file;
+ } elsif ($this->state eq 'kill-end') {
+ if ($this->inner_file) {
+ $record->{fh} =
+ IO::InnerFile->new($logfh,$record->{start},
+ $record->{stop} - $record->{start})
+ }