Started transforming into composition based OOP
diff --git a/lib/Krawfish/Corpus/Class.pm b/lib/Krawfish/Corpus/Class.pm
index 4a91fec..e0b3130 100644
--- a/lib/Krawfish/Corpus/Class.pm
+++ b/lib/Krawfish/Corpus/Class.pm
@@ -82,7 +82,9 @@
return;
};
-sub skip_to;
+sub skip_to {
+ ...
+};
sub to_string {
my $self = shift;
diff --git a/lib/Krawfish/Corpus/DocVector.pm b/lib/Krawfish/Corpus/DocVector.pm
index dd00054..fd23209 100644
--- a/lib/Krawfish/Corpus/DocVector.pm
+++ b/lib/Krawfish/Corpus/DocVector.pm
@@ -23,14 +23,24 @@
# in the dictionary and fetching the relevant doc_ids per
# segment. While doing that, the doc_ids are sorted and
# resulting in an index vector.
-sub _init;
+sub _init {
+ ...
+};
-sub next;
+sub next {
+ ...
+};
-sub current;
+sub current {
+ ...
+};
-sub max_freq;
+sub max_freq {
+ ...
+};
-sub to_string;
+sub to_string {
+ ...
+};
1;
diff --git a/lib/Krawfish/Corpus/OrWithFlags.pm b/lib/Krawfish/Corpus/OrWithFlags.pm
index bf905aa..a60b877 100644
--- a/lib/Krawfish/Corpus/OrWithFlags.pm
+++ b/lib/Krawfish/Corpus/OrWithFlags.pm
@@ -35,7 +35,9 @@
...;
};
-sub max_freq;
+sub max_freq {
+ ...
+};
1;
diff --git a/lib/Krawfish/Index/Fields/Doc.pm b/lib/Krawfish/Index/Fields/Doc.pm
index e6d0d37..71e9ddb 100644
--- a/lib/Krawfish/Index/Fields/Doc.pm
+++ b/lib/Krawfish/Index/Fields/Doc.pm
@@ -57,6 +57,8 @@
};
-sub to_stream;
+sub to_stream {
+ ...
+};
1;
diff --git a/lib/Krawfish/Index/Fields/Pointer.pm b/lib/Krawfish/Index/Fields/Pointer.pm
index 5ac97b1..a3b5f7f 100644
--- a/lib/Krawfish/Index/Fields/Pointer.pm
+++ b/lib/Krawfish/Index/Fields/Pointer.pm
@@ -48,9 +48,13 @@
};
-sub next_doc;
+sub next_doc {
+ ...
+};
-sub close;
+sub close {
+ ...
+};
# Skip doc moves the pointer forward in the stream. Although currently
diff --git a/lib/Krawfish/Index/Store/Dynamic/Dictionary.pm b/lib/Krawfish/Index/Store/Dynamic/Dictionary.pm
index 208c48c..d0cfca5 100644
--- a/lib/Krawfish/Index/Store/Dynamic/Dictionary.pm
+++ b/lib/Krawfish/Index/Store/Dynamic/Dictionary.pm
@@ -146,7 +146,9 @@
# This will return an array of term ids,
# in case the term is stored as an alias.
# Otherwise the array has only one item.
-sub search_alias;
+sub search_alias {
+ ...
+};
diff --git a/lib/Krawfish/Index/Store/V1/Dictionary.pm b/lib/Krawfish/Index/Store/V1/Dictionary.pm
index 764e61a..b9f449c 100644
--- a/lib/Krawfish/Index/Store/V1/Dictionary.pm
+++ b/lib/Krawfish/Index/Store/V1/Dictionary.pm
@@ -141,24 +141,38 @@
return;
};
-sub search_case_insensitive;
+sub search_case_insensitive {
+ ...
+};
-sub search_diacritic_insensitive;
+sub search_diacritic_insensitive {
+ ...
+};
-sub search_approximative;
+sub search_approximative {
+ ...
+};
-sub search_regex;
+sub search_regex {
+ ...
+};
# Merge static tree with dynamic tree
-sub merge;
+sub merge {
+ ...
+};
# Return iterator of term ids
# TODO:
# Be aware, this is only in collation
# order of the insertion, that may not be very helpful.
-sub in_prefix_order;
+sub in_prefix_order {
+ ...
+};
-sub in_suffix_order;
+sub in_suffix_order {
+ ...
+};
@@ -166,11 +180,15 @@
# Read with header
# This may first be done in the parent dictionary module
# and then be delegated to the right version
-sub from_file;
+sub from_file {
+ ...
+};
# write a header
-sub to_file;
+sub to_file {
+ ...
+};
# Stringification
diff --git a/lib/Krawfish/Index/Store/V1/ForwardIndex.pm b/lib/Krawfish/Index/Store/V1/ForwardIndex.pm
index fef6207..a579939 100644
--- a/lib/Krawfish/Index/Store/V1/ForwardIndex.pm
+++ b/lib/Krawfish/Index/Store/V1/ForwardIndex.pm
@@ -59,7 +59,9 @@
bless \$stream, $class;
};
-sub pos;
+sub pos {
+ ...
+};
# Add term by id
sub add_term_id {
diff --git a/lib/Krawfish/Index/Store/V1/ForwardPointer.pm b/lib/Krawfish/Index/Store/V1/ForwardPointer.pm
index 81b1f66..f5170d2 100644
--- a/lib/Krawfish/Index/Store/V1/ForwardPointer.pm
+++ b/lib/Krawfish/Index/Store/V1/ForwardPointer.pm
@@ -31,8 +31,12 @@
};
-sub next {}
+sub next {
+ ...
+}
-sub previous {};
+sub previous {
+ ...
+};
1;
diff --git a/lib/Krawfish/Index/Store/V1/Stream.pm b/lib/Krawfish/Index/Store/V1/Stream.pm
index 978f7a1..4e91e1e 100644
--- a/lib/Krawfish/Index/Store/V1/Stream.pm
+++ b/lib/Krawfish/Index/Store/V1/Stream.pm
@@ -26,9 +26,13 @@
# Load first X bytes from file
};
-sub skip_doc;
+sub skip_doc {
+ ...
+};
-sub next;
+sub next {
+ ...
+};
# This appends a byte sequence to a stream
# and updates the skiplist
diff --git a/lib/Krawfish/Index/Stream.pm b/lib/Krawfish/Index/Stream.pm
index 88b02ed..8ea5446 100644
--- a/lib/Krawfish/Index/Stream.pm
+++ b/lib/Krawfish/Index/Stream.pm
@@ -31,12 +31,16 @@
# Override
# This will describe the compression scheme
-sub add;
+sub add {
+ ...
+};
# Override
# This will describe the compression scheme
-sub get;
+sub get {
+ ...
+};
sub freq {
diff --git a/lib/Krawfish/Index/Stream/Finger.pm b/lib/Krawfish/Index/Stream/Finger.pm
index 0cabf85..08d1a5d 100644
--- a/lib/Krawfish/Index/Stream/Finger.pm
+++ b/lib/Krawfish/Index/Stream/Finger.pm
@@ -24,11 +24,17 @@
};
-sub skip_to;
+sub skip_to {
+ ...
+};
-sub next_pos;
+sub next_pos {
+ ...
+};
-sub next_doc;
+sub next_doc {
+ ...
+};
# Get the current posting object
sub current {
diff --git a/lib/Krawfish/Index/Tokens.pm b/lib/Krawfish/Index/Tokens.pm
index c67193d..9b3add9 100644
--- a/lib/Krawfish/Index/Tokens.pm
+++ b/lib/Krawfish/Index/Tokens.pm
@@ -64,9 +64,13 @@
...
};
-sub freq_in_doc;
+sub freq_in_doc {
+ ...
+};
-sub max_subtokens;
+sub max_subtokens {
+ ...
+};
1;
diff --git a/lib/Krawfish/Koral.pm b/lib/Krawfish/Koral.pm
index e029e35..3f1246c 100644
--- a/lib/Krawfish/Koral.pm
+++ b/lib/Krawfish/Koral.pm
@@ -1,18 +1,20 @@
package Krawfish::Koral;
-
-# TODO: Make this a role
-use parent 'Krawfish::Info';
+use Role::Tiny::With;
+use strict;
+use warnings;
+with 'Krawfish::Koral::Info';
+use Krawfish::Log;
+use Krawfish::Koral::Document;
use Krawfish::Koral::Query::Builder;
use Krawfish::Koral::Corpus::Builder;
use Krawfish::Koral::Meta::Builder;
use Krawfish::Koral::Meta;
-use Krawfish::Koral::Document;
-use Krawfish::Log;
-use strict;
-use warnings;
use constant DEBUG => 1;
+
+
+
# Parse a koral query and transform to an actual
# index query.
#
@@ -362,7 +364,9 @@
# Get KoralQuery with results
-sub to_result;
+sub to_result {
+ ...
+};
# TODO:
diff --git a/lib/Krawfish/Koral/Corpus.pm b/lib/Krawfish/Koral/Corpus.pm
index 22d0ecc..0bc1394 100644
--- a/lib/Krawfish/Koral/Corpus.pm
+++ b/lib/Krawfish/Koral/Corpus.pm
@@ -1,5 +1,6 @@
package Krawfish::Koral::Corpus;
-use parent 'Krawfish::Info';
+use Role::Tiny::With;
+with 'Krawfish::Koral::Info';
# TODO: Use the same parent as Koral::Query
use Krawfish::Koral::Corpus::Builder;
use Krawfish::Log;
@@ -63,7 +64,9 @@
# Optimize for an index
-sub optimize;
+sub optimize {
+ ...
+};
# Normalize to be on the root
@@ -186,11 +189,17 @@
# Query Application methods #
#############################
-sub from_koral;
+sub from_koral {
+ ...
+};
-sub to_koral_fragment;
+sub to_koral_fragment {
+ ...
+};
-sub to_string;
+sub to_string {
+ ...
+};
sub to_neutral {
$_[0]->to_string;
diff --git a/lib/Krawfish/Koral/Corpus/AndNot.pm b/lib/Krawfish/Koral/Corpus/AndNot.pm
index 4319f62..4c0a9a3 100644
--- a/lib/Krawfish/Koral/Corpus/AndNot.pm
+++ b/lib/Krawfish/Koral/Corpus/AndNot.pm
@@ -28,7 +28,9 @@
};
-sub toggle_negativity;
+sub toggle_negativity {
+ ...
+};
# Normalize queries
@@ -80,7 +82,9 @@
# Return koral - this is not necessary to be implemented,
# as "AndNot" is an intermediate query
-sub to_koral_fragment;
+sub to_koral_fragment {
+ ...
+};
# Stringification
diff --git a/lib/Krawfish/Koral/Corpus/Field.pm b/lib/Krawfish/Koral/Corpus/Field.pm
index a027b4f..403f771 100644
--- a/lib/Krawfish/Koral/Corpus/Field.pm
+++ b/lib/Krawfish/Koral/Corpus/Field.pm
@@ -108,7 +108,9 @@
return $self;
};
-sub can_toggle_negativity;
+sub can_toggle_negativity {
+ ...
+};
diff --git a/lib/Krawfish/Koral/Corpus/Static.pm b/lib/Krawfish/Koral/Corpus/Static.pm
index de100a3..b0cbab9 100644
--- a/lib/Krawfish/Koral/Corpus/Static.pm
+++ b/lib/Krawfish/Koral/Corpus/Static.pm
@@ -21,15 +21,21 @@
# Check if the ID is cached. In case it is cached,
# Return the cache query.
-sub memoize;
+sub memoize {
+ ...
+};
# Load the KoralQuery file, optimize the query,
# and wrap it in a cache for the next type it is consulted.
# The query is already normalized.
# This should only be loaded by some segments with updates.
-sub optimize;
+sub optimize {
+ ...
+};
-sub operands;
+sub operands {
+ ...
+};
1;
diff --git a/lib/Krawfish/Koral/Document/Annotation.pm b/lib/Krawfish/Koral/Document/Annotation.pm
index 98d6f4e..c024010 100644
--- a/lib/Krawfish/Koral/Document/Annotation.pm
+++ b/lib/Krawfish/Koral/Document/Annotation.pm
@@ -1,9 +1,8 @@
package Krawfish::Koral::Document::Annotation;
-use Krawfish::Koral::Query::Term;
use Krawfish::Util::String qw/squote/;
use warnings;
use strict;
-
+use Krawfish::Koral::Query::Term;
# Accepts a Krawfish::Koral::Query::Term object
sub new {
diff --git a/lib/Krawfish/Koral/Document/Subtoken.pm b/lib/Krawfish/Koral/Document/Subtoken.pm
index 9984d7a..00b9dc6 100644
--- a/lib/Krawfish/Koral/Document/Subtoken.pm
+++ b/lib/Krawfish/Koral/Document/Subtoken.pm
@@ -1,6 +1,6 @@
package Krawfish::Koral::Document::Subtoken;
-use Krawfish::Koral::Document::Annotation;
use Krawfish::Util::String qw/squote/;
+use Krawfish::Koral::Document::Annotation;
use warnings;
use strict;
diff --git a/lib/Krawfish/Info.pm b/lib/Krawfish/Koral/Info.pm
similarity index 96%
rename from lib/Krawfish/Info.pm
rename to lib/Krawfish/Koral/Info.pm
index 94629bf..882ef11 100644
--- a/lib/Krawfish/Info.pm
+++ b/lib/Krawfish/Koral/Info.pm
@@ -1,7 +1,8 @@
-package Krawfish::Info;
-use Krawfish::Log;
+package Krawfish::Koral::Info;
+use Role::Tiny;
use strict;
use warnings;
+use Krawfish::Log;
# TODO:
# Probably move to Krawfish::Koral::Info
diff --git a/lib/Krawfish/Koral/Query.pm b/lib/Krawfish/Koral/Query.pm
index 9293f6a..e4fa8c6 100644
--- a/lib/Krawfish/Koral/Query.pm
+++ b/lib/Krawfish/Koral/Query.pm
@@ -1,5 +1,6 @@
package Krawfish::Koral::Query;
-use parent 'Krawfish::Info';
+use Role::Tiny::With;
+with 'Krawfish::Koral::Info';
# TODO: Use the same parent as Koral::Corpus
use Krawfish::Koral::Query::Builder;
use Krawfish::Koral::Query::Importer;
@@ -43,7 +44,9 @@
};
-sub type;
+sub type {
+ ...
+};
#########################################
@@ -51,8 +54,11 @@
#########################################
+
# Normalize the query
-sub normalize;
+sub normalize {
+ ...
+};
# Refer to common subqueries
@@ -86,7 +92,9 @@
# Optimize for an index
-sub optimize;
+sub optimize {
+ ...
+};
# This is the class to be overwritten
@@ -155,7 +163,9 @@
# Returns a list of classes used by the query,
# e.g. in a focus() context.
-sub uses_classes;
+sub uses_classes {
+ ...
+};
sub remove_unused_classes {
@@ -379,7 +389,10 @@
# Overwritten
-sub to_koral_fragment;
+sub to_koral_fragment {
+ ...
+};
+
sub to_koral_query {
my $self = shift;
@@ -389,7 +402,9 @@
};
# Overwritten
-sub to_string;
+sub to_string {
+ ...
+};
sub to_neutral {
@@ -406,7 +421,9 @@
# TODO: Returns a value of complexity of the query,
# that can be used to decide, if a query should be cached.
-sub complexity;
+sub complexity {
+ ...
+};
# Create KoralQuery builder
diff --git a/lib/Krawfish/Koral/Query/Extension.pm b/lib/Krawfish/Koral/Query/Extension.pm
index a8ef732..ebf2e8d 100644
--- a/lib/Krawfish/Koral/Query/Extension.pm
+++ b/lib/Krawfish/Koral/Query/Extension.pm
@@ -63,9 +63,13 @@
};
};
-sub min_span;
+sub min_span {
+ ...
+};
-sub max_span;
+sub max_span {
+ ...
+};
sub to_string {
my $self = shift;
diff --git a/lib/Krawfish/Koral/Query/Length.pm b/lib/Krawfish/Koral/Query/Length.pm
index 86fddfc..13ba664 100644
--- a/lib/Krawfish/Koral/Query/Length.pm
+++ b/lib/Krawfish/Koral/Query/Length.pm
@@ -233,7 +233,9 @@
};
-sub from_koral;
+sub from_koral {
+ ...
+};
sub to_string {
diff --git a/lib/Krawfish/Koral/Query/Reference.pm b/lib/Krawfish/Koral/Query/Reference.pm
index 74ecfa2..f9094ce 100644
--- a/lib/Krawfish/Koral/Query/Reference.pm
+++ b/lib/Krawfish/Koral/Query/Reference.pm
@@ -28,7 +28,9 @@
}, $class;
};
-sub to_koral_fragment;
+sub to_koral_fragment {
+ ...
+};
sub type { 'reference' };
@@ -36,11 +38,23 @@
'ref(#' . $_[0]->{signature} . ')';
};
-sub is_extended_left;
-sub is_extended_right;
-sub is_extended;
-sub maybe_unsorted;
-sub min_span;
-sub max_span;
+sub is_extended_left {
+ ...
+};
+sub is_extended_right {
+ ...
+};
+sub is_extended {
+ ...
+};
+sub maybe_unsorted {
+ ...
+};
+sub min_span {
+ ...
+};
+sub max_span {
+ ...
+};
1;
diff --git a/lib/Krawfish/Koral/Query/Span.pm b/lib/Krawfish/Koral/Query/Span.pm
index 3e0e679..d9750f8 100644
--- a/lib/Krawfish/Koral/Query/Span.pm
+++ b/lib/Krawfish/Koral/Query/Span.pm
@@ -111,7 +111,9 @@
sub maybe_unsorted { 0 };
-sub from_koral;
+sub from_koral {
+ ...
+};
# Todo: Change the term_type!
diff --git a/lib/Krawfish/Koral/Result.pm b/lib/Krawfish/Koral/Result.pm
index dba4c2e..e6312a4 100644
--- a/lib/Krawfish/Koral/Result.pm
+++ b/lib/Krawfish/Koral/Result.pm
@@ -1,5 +1,6 @@
package Krawfish::Koral::Result;
-use parent 'Krawfish::Info';
+use Role::Tiny::With;
+with 'Krawfish::Koral::Info';
use strict;
use warnings;
diff --git a/lib/Krawfish/Posting/Group.pm b/lib/Krawfish/Posting/Group.pm
index c771fc7..a2a5089 100644
--- a/lib/Krawfish/Posting/Group.pm
+++ b/lib/Krawfish/Posting/Group.pm
@@ -9,10 +9,16 @@
# TODO:
# This is quite similar to K::P::Bundle
-sub freq;
+sub freq {
+ ...
+};
-sub doc_freq;
+sub doc_freq {
+ ...
+};
-sub to_hash;
+sub to_hash {
+ ...
+};
1;
diff --git a/lib/Krawfish/Posting/Sorted.pm b/lib/Krawfish/Posting/Sorted.pm
index 54a9e58..ce14570 100644
--- a/lib/Krawfish/Posting/Sorted.pm
+++ b/lib/Krawfish/Posting/Sorted.pm
@@ -8,12 +8,20 @@
# This posting iterator is returned by the HeapSort system.
-sub doc_id;
+sub doc_id {
+ ...
+};
-sub matches;
+sub matches {
+ ...
+};
-sub rank;
+sub rank {
+ ...
+};
-sub same;
+sub same {
+ ...
+};
1;
diff --git a/lib/Krawfish/Query.pm b/lib/Krawfish/Query.pm
index c91d2ac..14cd79f 100644
--- a/lib/Krawfish/Query.pm
+++ b/lib/Krawfish/Query.pm
@@ -24,17 +24,23 @@
# Overwrite
# TODO: Accepts a target doc
# TODO: Returns the doc_id of the current posting
-sub next;
+sub next {
+ ...
+};
-sub clone;
+sub clone {
+ ...
+};
# TODO:
# This is a value that should probably be stored
# at span-beginnings and can help to jump through very long
# sequences of spans
-sub max_length;
+sub max_length {
+ ...
+};
# This is only relevant for term posting lists
diff --git a/lib/Krawfish/Query/Base/Sorted.pm b/lib/Krawfish/Query/Base/Sorted.pm
index 44c93eb..f2dcb51 100644
--- a/lib/Krawfish/Query/Base/Sorted.pm
+++ b/lib/Krawfish/Query/Base/Sorted.pm
@@ -87,7 +87,9 @@
};
# Return index to last added element
-sub buffer_last;
+sub buffer_last {
+ ...
+};
# Points to the latest freed element in the buffer
# (normally this is -1 to first)
@@ -102,11 +104,16 @@
};
# sub buffer_push;
-sub buffer_shift;
-sub buffer_get;
+sub buffer_shift {
+ ...
+};
+
+sub buffer_get {
+ ...
+};
+
sub buffer_insert_after {
my ($self, $index, $element) = @_;
-
};
1;
diff --git a/lib/Krawfish/Query/Cache.pm b/lib/Krawfish/Query/Cache.pm
index 79490f5..db882ef 100644
--- a/lib/Krawfish/Query/Cache.pm
+++ b/lib/Krawfish/Query/Cache.pm
@@ -17,10 +17,16 @@
# The doc_ids are not stored as deltas,
# so sorting with offstes is supported
-sub next;
+sub next {
+ ...
+};
-sub max_freq;
+sub max_freq {
+ ...
+};
-sub clone;
+sub clone {
+ ...
+};
1;
diff --git a/lib/Krawfish/Query/Constraint/InDistanceSpan.pm b/lib/Krawfish/Query/Constraint/InDistanceSpan.pm
index b4e2d4a..7df9472 100644
--- a/lib/Krawfish/Query/Constraint/InDistanceSpan.pm
+++ b/lib/Krawfish/Query/Constraint/InDistanceSpan.pm
@@ -22,7 +22,9 @@
}, $class;
};
-sub clone;
+sub clone {
+ ...
+};
sub _init {
return if $_[0]->{init}++;
diff --git a/lib/Krawfish/Query/Extension.pm b/lib/Krawfish/Query/Extension.pm
index db0baf8..2a8b504 100644
--- a/lib/Krawfish/Query/Extension.pm
+++ b/lib/Krawfish/Query/Extension.pm
@@ -21,7 +21,9 @@
};
-sub clone;
+sub clone {
+ ...
+};
# Check the configuration
sub check {
diff --git a/lib/Krawfish/Query/Reference.pm b/lib/Krawfish/Query/Reference.pm
index a4b582f..ab0cba1 100644
--- a/lib/Krawfish/Query/Reference.pm
+++ b/lib/Krawfish/Query/Reference.pm
@@ -37,17 +37,27 @@
};
-sub clone;
+sub clone {
+ ...
+};
-sub next;
+sub next {
+ ...
+};
sub to_string {
my $self = shift;
};
-sub max_freq;
+sub max_freq {
+ ...
+};
-sub filter_by;
+sub filter_by {
+ ...
+};
+
+
1;
diff --git a/lib/Krawfish/Result/Group.pm b/lib/Krawfish/Result/Group.pm
index e2db10d..ea84e71 100644
--- a/lib/Krawfish/Result/Group.pm
+++ b/lib/Krawfish/Result/Group.pm
@@ -164,7 +164,9 @@
};
-sub current;
+sub current {
+ ...
+};
# Return a hash reference with information
diff --git a/lib/Krawfish/Result/Limit.pm b/lib/Krawfish/Result/Limit.pm
index 7f9bbb9..62349f9 100644
--- a/lib/Krawfish/Result/Limit.pm
+++ b/lib/Krawfish/Result/Limit.pm
@@ -47,11 +47,15 @@
};
# May return a hash reference with information
-sub current_match;
+sub current_match {
+ ...
+};
# May return a hash reference with information
-sub current_group;
+sub current_group {
+ ...
+};
# Stringify collector
diff --git a/lib/Krawfish/Result/Remote/Sort.pm b/lib/Krawfish/Result/Remote/Sort.pm
index e6eec6d..54a9b1b 100644
--- a/lib/Krawfish/Result/Remote/Sort.pm
+++ b/lib/Krawfish/Result/Remote/Sort.pm
@@ -25,6 +25,8 @@
}, $class;
};
-sub next;
+sub next {
+ ...
+};
1;
diff --git a/lib/Krawfish/Result/Segment/Aggregate/Base.pm b/lib/Krawfish/Result/Segment/Aggregate/Base.pm
index 4923267..8b101df 100644
--- a/lib/Krawfish/Result/Segment/Aggregate/Base.pm
+++ b/lib/Krawfish/Result/Segment/Aggregate/Base.pm
@@ -9,13 +9,16 @@
};
# Per default do nothing
-sub each_doc {};
+sub each_doc {
+};
# Per default do nothing
-sub each_match {};
+sub each_match {
+};
# Per default do nothing
-sub on_finish {};
+sub on_finish {
+};
# Not implemented on base
sub to_string {
diff --git a/lib/Krawfish/Result/Segment/Enrich/Snippet/Element.pm b/lib/Krawfish/Result/Segment/Enrich/Snippet/Element.pm
index 1190093..47c9f4d 100644
--- a/lib/Krawfish/Result/Segment/Enrich/Snippet/Element.pm
+++ b/lib/Krawfish/Result/Segment/Enrich/Snippet/Element.pm
@@ -1,13 +1,21 @@
-package Krawfish::Result::Snippet::Element;
+package Krawfish::Result::Segment::Snippet::Element;
use Krawfish::Log;
use strict;
use warnings;
-sub start_char;
-sub end_char;
+sub start_char {
+ ...
+};
+sub end_char {
+ ...
+};
-sub open_html;
-sub close_html;
+sub open_html {
+ ...
+};
+sub close_html {
+ ...
+};
1;
diff --git a/lib/Krawfish/Result/Sort/Priority.pm b/lib/Krawfish/Result/Sort/Priority.pm
index cde1362..fde2c8c 100644
--- a/lib/Krawfish/Result/Sort/Priority.pm
+++ b/lib/Krawfish/Result/Sort/Priority.pm
@@ -127,7 +127,9 @@
# in sorted order to document the sort criteria.
# Like: [[class_1 => 'cba'], [author => 'Goethe']]...
# This is necessary for the cluster-merge-sort
-sub current_sort;
+sub current_sort {
+ ...
+};
sub to_string {
diff --git a/lib/Krawfish/Util/RingBuffer.pm b/lib/Krawfish/Util/RingBuffer.pm
index dc21d1c..5d21c28 100644
--- a/lib/Krawfish/Util/RingBuffer.pm
+++ b/lib/Krawfish/Util/RingBuffer.pm
@@ -124,7 +124,9 @@
$_[0]->{span};
};
-sub to_string;
+sub to_string {
+ ...
+};
# sub size;
# sub clear;