Merge branch 'JABAWS_Release_2_5' into develop
[jabaws.git] / binaries / src / jpred / lib / Concise.pm
diff --git a/binaries/src/jpred/lib/Concise.pm b/binaries/src/jpred/lib/Concise.pm
new file mode 100644 (file)
index 0000000..c11b513
--- /dev/null
@@ -0,0 +1,29 @@
+package Concise;
+
+use strict;
+use warnings;
+use Carp;
+
+use base qw(Root Sequence);
+
+sub id {
+       my ($self, $id) = @_;
+
+       if (defined $id) {
+               warn "'$1' detected in ID, changing to ';'\n" if $id =~ s/([:#])/;/
+       }
+
+       $self->SUPER::id($id);
+}
+
+sub seq {
+       my ($self, @entries) = @_;
+
+       for (@entries) {
+               warn "'$1' detected in entry, changing to ';'\n" if s/([:#,])/;/
+       }
+
+       $self->SUPER::seq(@entries);
+}
+
+1;