__PACKAGE__->mk_accessors( qw/
debug
create_dump
-store
+session
sock
state
my $server = CWMP::Session->new({
sock => $io_socket_object,
- store => 'state.db',
+ store => { ... },
debug => 1,
create_dump => 1,
});
my $self = $class->SUPER::new( @_ );
confess "need sock" unless $self->sock;
+ confess "need store" unless $self->store;
+ my $peerhost = $self->sock->peerhost || confess "can't get sock->peerhost";
$self->debug( 0 ) unless $self->debug;
- warn "created ", __PACKAGE__, "(", dump( @_ ), ") for ", $self->sock->peerhost, "\n" if $self->debug;
+ warn "created ", __PACKAGE__, "(", dump( @_ ), ") for $peerhost\n" if $self->debug;
my $store_obj = CWMP::Store->new({
debug => $self->debug,