remove debug messages all over chunked code
[perl-cwmp.git] / lib / CWMP / Request.pm
index 4ca8d45..0cea935 100644 (file)
@@ -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';
                };