remove debug messages all over chunked code
[perl-cwmp.git] / lib / CWMP / Request.pm
index ef8c322..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 {
@@ -103,6 +104,28 @@ push @$rules,
                        $state->{_trigger} = 'GetParameterNamesResponse';
                };
        
+=head2 GetParameterAttributesResponse
+
+=cut
+
+push @$rules,
+               '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';
+               };
+
 =head2 Fault
 
 =cut