--- trunk/Estraier.pm 2006/01/04 14:48:11 6 +++ trunk/Estraier.pm 2006/01/04 14:57:27 7 @@ -43,6 +43,8 @@ package Search::Estraier::Document; +use Carp qw/confess/; + =head1 Search::Estraier::Document Document for HyperEstraier @@ -132,6 +134,20 @@ return $self->{id}; } +=head2 attr_names + +Get a list of attribute names of a document object. + + my @attrs = $doc->attr_names; + +=cut + +sub attr_names { + my $self = shift; + confess "attr_names return array, not scalar" if (! wantarray); + return sort keys %{ $self->{attrs} }; +} + =head2 dump_draft print $doc->dump_draft;