43 |
|
|
44 |
package Search::Estraier::Document; |
package Search::Estraier::Document; |
45 |
|
|
46 |
|
use Carp qw/confess/; |
47 |
|
|
48 |
=head1 Search::Estraier::Document |
=head1 Search::Estraier::Document |
49 |
|
|
50 |
Document for HyperEstraier |
Document for HyperEstraier |
134 |
return $self->{id}; |
return $self->{id}; |
135 |
} |
} |
136 |
|
|
137 |
|
=head2 attr_names |
138 |
|
|
139 |
|
Get a list of attribute names of a document object. |
140 |
|
|
141 |
|
my @attrs = $doc->attr_names; |
142 |
|
|
143 |
|
=cut |
144 |
|
|
145 |
|
sub attr_names { |
146 |
|
my $self = shift; |
147 |
|
confess "attr_names return array, not scalar" if (! wantarray); |
148 |
|
return sort keys %{ $self->{attrs} }; |
149 |
|
} |
150 |
|
|
151 |
=head2 dump_draft |
=head2 dump_draft |
152 |
|
|
153 |
print $doc->dump_draft; |
print $doc->dump_draft; |