confess "unknown store module $module not one of ", dump( $self->possible_stores ) unless $s;
- warn "## current store = $s\n" if $self->debug;
+ warn "#### current store = $s\n" if $self->debug > 4;
return $s;
}
confess "need $k value" unless $v;
confess "need state" unless $state;
- warn "## update_state( $k => $v, ", dump( $state ), " )\n" if $self->debug;
+ warn "#### update_state( $k => $v, ", dump( $state ), " )\n" if $self->debug > 4;
my $uid;
confess "need ID or uid" unless $k =~ m/^(ID|uid)$/;
confess "need $k value" unless $v;
- warn "## get_state( $k => $v )\n" if $self->debug;
+ warn "#### get_state( $k => $v )\n" if $self->debug > 4;
my $uid;
confess "need ID" unless $ID;
- warn "ID_to_uid",dump( $ID, $state ),$/ if $self->debug;
+ warn "#### ID_to_uid",dump( $ID, $state ),$/ if $self->debug > 4;
$session->{ $ID }->{last_seen} = time();
return $uid;
} else {
warn "## can't find uid for ID $ID, first seen?\n";
- return;
}
# TODO: expire sessions longer than 30m
- warn "current session = ",dump( $session );
-
return;
}