8 |
__PACKAGE__->mk_accessors( qw/ |
__PACKAGE__->mk_accessors( qw/ |
9 |
debug |
debug |
10 |
create_dump |
create_dump |
11 |
store |
session |
12 |
|
|
13 |
sock |
sock |
14 |
state |
state |
34 |
|
|
35 |
my $server = CWMP::Session->new({ |
my $server = CWMP::Session->new({ |
36 |
sock => $io_socket_object, |
sock => $io_socket_object, |
37 |
store => 'state.db', |
store => { ... }, |
38 |
debug => 1, |
debug => 1, |
39 |
create_dump => 1, |
create_dump => 1, |
40 |
}); |
}); |
46 |
my $self = $class->SUPER::new( @_ ); |
my $self = $class->SUPER::new( @_ ); |
47 |
|
|
48 |
confess "need sock" unless $self->sock; |
confess "need sock" unless $self->sock; |
49 |
|
confess "need store" unless $self->store; |
50 |
|
my $peerhost = $self->sock->peerhost || confess "can't get sock->peerhost"; |
51 |
|
|
52 |
$self->debug( 0 ) unless $self->debug; |
$self->debug( 0 ) unless $self->debug; |
53 |
|
|
54 |
warn "created ", __PACKAGE__, "(", dump( @_ ), ") for ", $self->sock->peerhost, "\n" if $self->debug; |
warn "created ", __PACKAGE__, "(", dump( @_ ), ") for $peerhost\n" if $self->debug; |
55 |
|
|
56 |
my $store_obj = CWMP::Store->new({ |
my $store_obj = CWMP::Store->new({ |
57 |
debug => $self->debug, |
debug => $self->debug, |