X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2FCWMP%2FServer.pm;h=76348065a958d8faf0fdf6ee7837527870a4a42e;hb=acf749f488794b1234814fe3d04f69d350d1a133;hp=51a520a4b154695715d92e6e42cb05f7a01f0d94;hpb=b1f0ff50033a9e8f2fbc75828452baa41ff83608;p=perl-cwmp.git diff --git a/lib/CWMP/Server.pm b/lib/CWMP/Server.pm index 51a520a..7634806 100644 --- a/lib/CWMP/Server.pm +++ b/lib/CWMP/Server.pm @@ -7,7 +7,7 @@ use warnings; use base qw/Class::Accessor/; __PACKAGE__->mk_accessors( qw/ port -store_path +store default_queue background debug @@ -30,7 +30,7 @@ CWMP::Server - description my $server = CWMP::Server->new({ port => 3333, - store_path => 'state.db', + store => 'state.db', default_queue => [ qw/GetRPCMethods GetParameterNames/ ], background => 1, debug => 1 @@ -44,9 +44,10 @@ Options: port to listen on -=item store_path +=item store -path to L database file to preserve state +hash with key C with value C if L +is used. Other parametars are optional. =item default_queue @@ -72,7 +73,7 @@ sub new { proto => 'tcp', port => $self->port, default_queue => $self->default_queue, - store_path => $self->store_path, + store => $self->store, debug => $self->debug, background => $self->background, }) @@ -109,7 +110,7 @@ sub options { $self->SUPER::options($template); # new single-value options - foreach my $p ( qw/ store_path debug / ) { + foreach my $p ( qw/ store debug / ) { $prop->{ $p } ||= undef; $template->{ $p } = \$prop->{ $p }; } @@ -140,7 +141,7 @@ sub process_request { my $session = CWMP::Session->new({ sock => $sock, queue => $prop->{default_queue}, - store_path => $prop->{store_path}, + store => $prop->{store}, debug => $prop->{debug}, }) || confess "can't create session";