X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=lib%2FCWMP%2FRequest.pm;h=0cea935227fb4d15a7ebbf58a1f5fe1956324a1f;hb=774c5ba74d808d504f5e6dd2b838f68e37b50842;hp=4ca8d45088d46c0528f690de4c0c491b5d491df8;hpb=3e32a398fbc753bc6cf4d9bcb6c855a670c2f7dc;p=perl-cwmp.git diff --git a/lib/CWMP/Request.pm b/lib/CWMP/Request.pm index 4ca8d45..0cea935 100644 --- a/lib/CWMP/Request.pm +++ b/lib/CWMP/Request.pm @@ -31,6 +31,7 @@ our $rules = [ 'ID' => sub { my ($tag_name, $tag_hash, $context, $parent_data) = @_; $state->{ID} = $tag_hash->{_content}; + chomp( $state->{ID} ); }, 'DeviceId' => sub { @@ -108,9 +109,20 @@ push @$rules, =cut push @$rules, - 'GetParameterAttributesResponse' => sub { + 'ParameterAttributeStruct' => sub { my ($tag_name, $tag_hash, $context, $parent_data) = @_; warn dump( $tag_name, $tag_hash, $context ); + + confess "need state" unless ( $state ); # don't remove! + + my $name = _tag($tag_hash, 'Name', '_content'); + + + $state->{ParameterAttribute}->{$name} = { + Notification => _tag($tag_hash, 'Notification', '_content' ), + AccessList => _tag($tag_hash, 'AccessList', 'string' ), + }; + $state->{_trigger} = 'GetParameterAttributesResponse'; };