die "unchecked" unless exists $r->{Divert};
}
+sub _must_be_post ($) {
+ my ($r) = @_;
+ my $meth = $r->_ch('get_method');
+ die "mutating non-POST" if $meth ne 'POST';
+}
+
sub check_mutate ($) {
my ($r) = @_;
$r->_assert_checked();
die if $r->{Divert};
- my $meth = $r->_ch('get_method');
- die "mutating non-POST" if $meth ne 'POST';
+ $r->_must_be_post();
}
#---------- output ----------