gen_postmainpage_form => \&gen_postmainpage_form,
gettext => sub { gettext($_[2]); },
print => sub { print $_[2] or die $!; },
+ debug => sub { }, # like print; msgs contain trailing \n
},
Dbh => undef,
};
my $p = scalar $r->_ch('get_param',$pn)
}
+sub _debug ($@) {
+ my ($r,@args) = @_;
+ $r->_ch('debug',@args);
+}
+
sub _get_path ($$) {
my ($v,$keybase) = @_;
my $leaf = $v->{S}{"${keybase}_path"};
? $cooks : undef;
my ($parmt) = $r->_identify($parmh, $parms);
-#print STDERR "_c_d_c cookt=$cookt parmt=$parmt\n";
+ $r->_debug("_c_d_c cookt=$cookt parmt=$parmt\n");
if ($r->_ch('is_logout')) {
$r->_must_be_post();
my $dbh = $r->{Dbh};
$r->{Divert} = $r->_db_transaction(sub { $r->_check_divert_core(); });
$dbh->commit();
-#print STDERR Dumper($r->{Divert});
+ $r->_debug(Data::Dumper->Dump([$r->{Divert}],[qw(divert)]));
return $r->{Divert};
}