| 1 | package Plucene::Index::TermInfo; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Plucene::Index::TermInfo - Information on an index term | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | my $term_info = Plucene::Index::TermInfo->new({ | ||
| 10 | doc_freq => $doc_freq, | ||
| 11 | freq_pointer => $freq_pointer, | ||
| 12 | prox_pointer => $prox_pointer, | ||
| 13 | }); | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | This class holds information about an index term. | ||
| 18 | |||
| 19 | =head1 METHODS | ||
| 20 | |||
| 21 | =cut | ||
| 22 | |||
| 23 | 19 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | 19 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | |||
| 26 | 19 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | |||
| 28 | 19 | ▶ | use base 'Class::Accessor::Fast'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 29 | |||
| 30 | =head2 doc_freq / freq_pointer / prox_pointer | ||
| 31 | |||
| 32 | Get / set term info. | ||
| 33 | |||
| 34 | =cut | ||
| 35 | |||
| 36 | 19 | __PACKAGE__->mk_accessors(qw( doc_freq freq_pointer prox_pointer )); | |
| 37 | |||
| 38 | =head2 copy_in / clone | ||
| 39 | |||
| 40 | $term_info1->copy_in($term_info2); | ||
| 41 | |||
| 42 | my $term_info1 = $term_info2->clone; | ||
| 43 | |||
| 44 | These will make $term_info1 be the same as $term_info2. | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | 0 | ▶ | sub copy_in { |
|
Subroutine
copy_in: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 49 | 0 | my ($self, $other) = @_; | |
| 50 | 0 | %$self = %$other; | |
| 51 | 0 | return $self; | |
| 52 | } | ||
| 53 | |||
| 54 | 80879 | ▶ | sub clone { |
|
Subroutine
clone: called CC=1 SCAR=0.0
Pod
documented
| |||
| 55 | 80879 | my $self = shift; | |
| 56 | 80879 | return bless {%$self} => ref $self; | |
| 57 | } | ||
| 58 | |||
| 59 | 19 | 1; | |