/[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 26 by dpavlin, Sun Jun 17 23:02:08 2007 UTC revision 27 by dpavlin, Sun Jun 17 23:05:52 2007 UTC
# Line 16  my $state; Line 16  my $state;
16  sub _tag {  sub _tag {
17          my ( $tag_hash, $name, $sub_key ) = @_;          my ( $tag_hash, $name, $sub_key ) = @_;
18          confess "need hash as first argument" unless ( ref $tag_hash eq 'HASH' );          confess "need hash as first argument" unless ( ref $tag_hash eq 'HASH' );
19          $name = (grep { m/$name/i } keys %$tag_hash )[0];          $name = (grep { m/^(?:\w+:)*$name$/i } keys %$tag_hash )[0];
20  #       $name =~ s/^\w+://;  #       $name =~ s/^\w+://;
21          if ( defined $tag_hash->{$name} ) {          if ( defined $tag_hash->{$name} ) {
22                  if ( ! defined $sub_key ) {                  if ( ! defined $sub_key ) {
# Line 49  my $parser = XML::Rules->new( Line 49  my $parser = XML::Rules->new(
49                          my ($tag_name, $tag_hash, $context, $parent_data) = @_;                          my ($tag_name, $tag_hash, $context, $parent_data) = @_;
50                          warn dump( $tag_name, $tag_hash, $context );                          warn dump( $tag_name, $tag_hash, $context );
51                  },                  },
52                    'ID' => sub {
53                            my ($tag_name, $tag_hash, $context, $parent_data) = @_;
54                            $state->{ID} = $tag_hash->{_content};
55                    },
56                  #                  #
57                  # Inform                  # Inform
58                  #                  #

Legend:
Removed from v.26  
changed lines
  Added in v.27

  ViewVC Help
Powered by ViewVC 1.1.26