/[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 18 by dpavlin, Wed Jan 4 22:48:29 2006 UTC revision 19 by dpavlin, Wed Jan 4 23:10:48 2006 UTC
# Line 324  sub new { Line 324  sub new {
324          my $self = {};          my $self = {};
325          bless($self, $class);          bless($self, $class);
326    
327            $self->{max} = -1;
328            $self->{options} = 0;
329    
330          $self ? return $self : return undef;          $self ? return $self : return undef;
331  }  }
332    
# Line 415  sub phrase { Line 418  sub phrase {
418          return $self->{phrase};          return $self->{phrase};
419  }  }
420    
421    =head2 order
422    
423    Return search result order.
424    
425      print $cond->order;
426    
427    =cut
428    
429    sub order {
430            my $self = shift;
431            return $self->{order};
432    }
433    
434    =head2 attrs
435    
436    Return search result attrs.
437    
438      my @cond_attrs = $cond->attrs;
439    
440    =cut
441    
442    sub attrs {
443            my $self = shift;
444            #croak "attrs return array, not scalar" if (! wantarray);
445            return @{ $self->{attrs} };
446    }
447    
448    =head2 max
449    
450    Return maximum number of results.
451    
452      print $cond->max;
453    
454    C<-1> is returned for unitialized value, C<0> is unlimited.
455    
456    =cut
457    
458    sub max {
459            my $self = shift;
460            return $self->{max};
461    }
462    
463    =head2 options
464    
465    Return options for this condition.
466    
467      print $cond->options;
468    
469    Options are returned in numerical form.
470    
471    =cut
472    
473    sub options {
474            my $self = shift;
475            return $self->{options};
476    }
477    
478    
479  package Search::Estraier::Master;  package Search::Estraier::Master;
480    

Legend:
Removed from v.18  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.26