From f164de0a280f1ebcf8fd031f58ea917fb79bcedf Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 28 Oct 2007 16:39:58 +0000 Subject: [PATCH] great API breaking update to version [0.07] CWMP::Response (which somewhat made sense since it was response from server) is now called CWMP::Methods (to more closely match protocol terminology) git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@172 836a5e1a-633d-0410-964b-294494ad4392 --- Makefile.PL | 2 +- lib/CWMP.pod | 11 +++++++++++ lib/CWMP/{Response.pm => Methods.pm} | 6 +++--- lib/CWMP/Session.pm | 4 ++-- t/00-load.t | 2 +- t/{20-response.t => 20-methods.t} | 6 +++--- 6 files changed, 21 insertions(+), 10 deletions(-) rename lib/CWMP/{Response.pm => Methods.pm} (95%) rename t/{20-response.t => 20-methods.t} (89%) diff --git a/Makefile.PL b/Makefile.PL index 7431569..31c79c4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,7 +3,7 @@ use lib './lib'; use inc::Module::Install; name 'CWMP'; -version '0.06'; +version '0.07'; license 'GPL'; requires 'Net::Server'; requires 'HTTP::Daemon'; diff --git a/lib/CWMP.pod b/lib/CWMP.pod index c3591b3..0810a9c 100644 --- a/lib/CWMP.pod +++ b/lib/CWMP.pod @@ -4,6 +4,15 @@ CWMP - CPE WAN Management Protocol =head1 DESCRIPTION +This is free, open source implementation of + +DSL Forum: TR-069 - CPE WAN Management Protocol, May 2004 + +In essence, it's relaxed SOAP server which eats garbage and tries to produce +standard compliant results. + +Standard defines following methods: + CPE methods Responding Calling GetRPCMethods Required Optional @@ -32,6 +41,8 @@ CWMP - CPE WAN Management Protocol Kicked Optional Optional +To see implemented methods take a look in L + =head1 AUTHOR Dobrica Pavlinusic, C<< dpavlin@rot13.org >> diff --git a/lib/CWMP/Response.pm b/lib/CWMP/Methods.pm similarity index 95% rename from lib/CWMP/Response.pm rename to lib/CWMP/Methods.pm index 4094114..f8bf3ae 100644 --- a/lib/CWMP/Response.pm +++ b/lib/CWMP/Methods.pm @@ -1,4 +1,4 @@ -package CWMP::Response; +package CWMP::Methods; use strict; use warnings; @@ -13,13 +13,13 @@ use Data::Dump qw/dump/; =head1 NAME -CWMP::Response - generate SOAP meesage for response +CWMP::Methods - generate SOAP meesages for CPE =head2 METHODS =head2 new - my $response = CWMP::Response->new({ debug => 1 }); + my $response = CWMP::Methods->new({ debug => 1 }); =cut diff --git a/lib/CWMP/Session.pm b/lib/CWMP/Session.pm index 4df8709..fd50a53 100644 --- a/lib/CWMP/Session.pm +++ b/lib/CWMP/Session.pm @@ -21,7 +21,7 @@ use Carp qw/confess cluck croak/; use File::Slurp; use CWMP::Request; -use CWMP::Response; +use CWMP::Methods; use CWMP::Store; =head1 NAME @@ -192,7 +192,7 @@ sub dispatch { push @args, @a; } - my $response = CWMP::Response->new({ debug => $self->debug }); + my $response = CWMP::Methods->new({ debug => $self->debug }); if ( $response->can( $dispatch ) ) { warn ">>> dispatching to $dispatch\n"; diff --git a/t/00-load.t b/t/00-load.t index 89ef933..ccd135f 100755 --- a/t/00-load.t +++ b/t/00-load.t @@ -10,7 +10,7 @@ use blib; BEGIN { use_ok('CWMP::Server'); use_ok('CWMP::Request'); - use_ok('CWMP::Response'); + use_ok('CWMP::Methods'); use_ok('CWMP::Store'); } diff --git a/t/20-response.t b/t/20-methods.t similarity index 89% rename from t/20-response.t rename to t/20-methods.t index df885b8..ac09cb9 100755 --- a/t/20-response.t +++ b/t/20-methods.t @@ -11,14 +11,14 @@ use File::Slurp; use blib; BEGIN { - use_ok('CWMP::Response'); + use_ok('CWMP::Methods'); } ok(my $abs_path = abs_path($0), "abs_path"); $abs_path =~ s!/[^/]*$!/!; #!fix-vim -ok( my $response = CWMP::Response->new({ debug => $debug }), 'new' ); -isa_ok( $response, 'CWMP::Response' ); +ok( my $response = CWMP::Methods->new({ debug => $debug }), 'new' ); +isa_ok( $response, 'CWMP::Methods' ); sub check_response { my $command = shift || die "no command?"; -- 2.20.1