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

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

revision 5 by dpavlin, Wed Jan 4 14:38:35 2006 UTC revision 6 by dpavlin, Wed Jan 4 14:48:11 2006 UTC
# Line 58  sub new { Line 58  sub new {
58          my $self = {@_};          my $self = {@_};
59          bless($self, $class);          bless($self, $class);
60    
61            $self->{id} = -1;
62    
63          $self ? return $self : return undef;          $self ? return $self : return undef;
64  }  }
65    
66    
67  =head2 add_attr  =head2 add_attr
68    
69    Add an attribute.
70    
71    $doc->add_attr( name => 'value' );    $doc->add_attr( name => 'value' );
72    
73  B<FIXME>: delete attribute using  B<FIXME>: delete attribute using
# Line 84  sub add_attr { Line 88  sub add_attr {
88    
89  =head2 add_text  =head2 add_text
90    
91    Add a sentence of text.
92    
93    $doc->add_text('this is example text to display');    $doc->add_text('this is example text to display');
94    
95  =cut  =cut
# Line 99  sub add_text { Line 105  sub add_text {
105    
106  =head2 add_hidden_text  =head2 add_hidden_text
107    
108    Add a hidden sentence.
109    
110    $doc->add_hidden_text('this is example text just for search');    $doc->add_hidden_text('this is example text just for search');
111    
112  =cut  =cut
# Line 111  sub add_hidden_text { Line 119  sub add_hidden_text {
119          push @{ $self->{htexts} }, _s($text);          push @{ $self->{htexts} }, _s($text);
120  }  }
121    
122    =head2 id
123    
124    Get the ID number of document. If the object has never been registred, C<-1> is returned.
125    
126      print $doc->id;
127    
128    =cut
129    
130    sub id {
131            my $self = shift;
132            return $self->{id};
133    }
134    
135  =head2 dump_draft  =head2 dump_draft
136    
137    print $doc->dump_draft;    print $doc->dump_draft;

Legend:
Removed from v.5  
changed lines
  Added in v.6

  ViewVC Help
Powered by ViewVC 1.1.26