--- trunk/Estraier.pm 2006/01/04 22:48:29 18 +++ trunk/Estraier.pm 2006/01/04 23:10:48 19 @@ -324,6 +324,9 @@ my $self = {}; bless($self, $class); + $self->{max} = -1; + $self->{options} = 0; + $self ? return $self : return undef; } @@ -415,6 +418,63 @@ return $self->{phrase}; } +=head2 order + +Return search result order. + + print $cond->order; + +=cut + +sub order { + my $self = shift; + return $self->{order}; +} + +=head2 attrs + +Return search result attrs. + + my @cond_attrs = $cond->attrs; + +=cut + +sub attrs { + my $self = shift; + #croak "attrs return array, not scalar" if (! wantarray); + return @{ $self->{attrs} }; +} + +=head2 max + +Return maximum number of results. + + print $cond->max; + +C<-1> is returned for unitialized value, C<0> is unlimited. + +=cut + +sub max { + my $self = shift; + return $self->{max}; +} + +=head2 options + +Return options for this condition. + + print $cond->options; + +Options are returned in numerical form. + +=cut + +sub options { + my $self = shift; + return $self->{options}; +} + package Search::Estraier::Master;