Cleanup for publication
Change-Id: Ibc49a45239cfedf61ffc223713eb90ab205f771e
diff --git a/lib/Krawfish/Posting.pm b/lib/Krawfish/Posting.pm
index e83ca35..ed29d65 100644
--- a/lib/Krawfish/Posting.pm
+++ b/lib/Krawfish/Posting.pm
@@ -4,6 +4,10 @@
use strict;
use warnings;
+# Krawfish::Posting is the base class for all
+# span based postings.
+# May better be named "Krawfish::Posting::Span"
+
# Constructor
sub new {
my $class = shift;
@@ -64,6 +68,19 @@
};
+# Check if two postings are identical
+# WARNING:
+# This should compare payloads separately,
+# because classes may be in different order,
+# though resulting in identical postings
+sub same_as {
+ my ($self, $comp) = @_;
+ return unless $comp;
+ return $self->to_string eq $comp->to_string;
+};
+
+
+# Return all classes in the payload
sub get_classes {
my ($self, $nrs) = @_;
@@ -157,12 +174,4 @@
};
-# Check if two postings are identical
-sub same_as {
- my ($self, $comp) = @_;
- return unless $comp;
- return $self->to_string eq $comp->to_string;
-};
-
-
1;