/[cwmp]/google/rules.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /google/rules.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 24 by dpavlin, Sun Jun 17 22:14:59 2007 UTC revision 25 by dpavlin, Sun Jun 17 22:33:45 2007 UTC
# Line 37  my $parser = XML::Rules->new( Line 37  my $parser = XML::Rules->new(
37                  },                  },
38                  qr/EventStruct/ => sub {                  qr/EventStruct/ => sub {
39                          my ($tag_name, $tag_hash, $context, $parent_data) = @_;                          my ($tag_name, $tag_hash, $context, $parent_data) = @_;
                         warn dump( $tag_name, $tag_hash );  
40                          push @{ $state->{EventStruct} }, $tag_hash->{EventCode}->{_content};                          push @{ $state->{EventStruct} }, $tag_hash->{EventCode}->{_content};
41                  },                  },
42                  qr/MaxEnvelopes/ => sub {                  qr/(MaxEnvelopes|CurrentTime|RetryCount)/ => sub {
43                          my ($tag_name, $tag_hash, $context, $parent_data) = @_;                          my ($tag_name, $tag_hash, $context, $parent_data) = @_;
44                          $state->{MaxEnvelopes} = $tag_hash->{_content};                          $state->{$tag_name} = $tag_hash->{_content};
45                  }                  },
46                    qr/ParameterValueStruct/ => sub {
47                            my ($tag_name, $tag_hash, $context, $parent_data) = @_;
48                            # Name/Value tags must be case insnesitive
49                            my $name = (grep( /name/i, keys %$tag_hash ))[0];
50                            my $value = (grep( /value/i, keys %$tag_hash ))[0];
51                            $state->{Parameter}->{ $tag_hash->{$name}->{_content} } = $tag_hash->{$value}->{_content};
52                    },
53          ]          ]
54  );  );
55    

Legend:
Removed from v.24  
changed lines
  Added in v.25

  ViewVC Help
Powered by ViewVC 1.1.26