move stuff around and try to get pc59 handling/generation more correct
[spider.git] / perl / Route / Node.pm
index f3072db121cb747b440c838244cc51025606cf3c..4e1692f13275792fa9a46e3b811aae4b76dbe0f1 100644 (file)
@@ -270,6 +270,24 @@ sub get_all
        return values %list;
 }
 
+#
+# pc59 entity encoding and decoding
+#
+sub enc_pc59
+{
+       my $self = shift;
+       my $sort = shift || 'N';
+       my $out = "$sort$self->{flags}$self->{call}";
+       if ($sort eq 'N') {
+               if ($self->{build}) {
+                       $out .= "b$self->{build}";
+               } elsif ($self->{version}) {
+                       $out .= "v$self->{version}"; 
+               }
+       }
+       return $out;
+}
+
 sub DESTROY
 {
        my $self = shift;