/[Search-Estraier]/trunk/Estraier.pm
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 /trunk/Estraier.pm

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

revision 7 by dpavlin, Wed Jan 4 14:57:27 2006 UTC revision 8 by dpavlin, Wed Jan 4 15:04:58 2006 UTC
# Line 83  sub add_attr { Line 83  sub add_attr {
83          my $attrs = {@_};          my $attrs = {@_};
84    
85          while (my ($name, $value) = each %{ $attrs }) {          while (my ($name, $value) = each %{ $attrs }) {
86                  push @{ $self->{attrs}->{_s($name)} }, _s($value);                  $self->{attrs}->{_s($name)} = _s($value);
87          }          }
88    
89            return 1;
90  }  }
91    
92    
# Line 148  sub attr_names { Line 150  sub attr_names {
150          return sort keys %{ $self->{attrs} };          return sort keys %{ $self->{attrs} };
151  }  }
152    
153    
154    =head2 attr
155    
156    Get the value of an attribute.
157    
158      my $value = $doc->attr( 'attribute' );
159    
160    =cut
161    
162    sub attr {
163            my $self = shift;
164            my $name = shift;
165    
166            return $self->{'attrs'}->{ $name };
167    }
168    
169  =head2 dump_draft  =head2 dump_draft
170    
171    print $doc->dump_draft;    print $doc->dump_draft;

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26