From 85e74f61af85356830030596e9ff77faf2f7c05f Mon Sep 17 00:00:00 2001 From: martin f. krafft Date: Fri, 24 Feb 2017 07:41:29 +1300 Subject: Loosen version check on data file read The versioning of the data file allows for making changes to the format, but if the script version increases without the data file-format being changed, things are expected to work as before, and thus there ought not be an error spouted. Let's only use the versioning to patch up handling for formats of the past. Signed-off-by: martin f. krafft --- scripts/ctrlact.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/ctrlact.pl b/scripts/ctrlact.pl index aa9dcfb..da39804 100644 --- a/scripts/ctrlact.pl +++ b/scripts/ctrlact.pl @@ -432,14 +432,14 @@ sub load_mappings { my $nrcols = 4; if ($version eq $VERSION) { - # current version + # current version, i.e. no special handling is required. If + # previous versions require special handling, then massage the + # data or do whatever is required in the following + # elsif-clauses: } elsif ($version eq "1.0") { $nrcols = 3; } - else { - croak "Unsupported version found in $filename: $version" - } my $linesplitter = '^\s*'.join('\s+', ('(\S+)') x $nrcols).'\s*$'; my $l = 1; while (<$fh>) { -- cgit v1.2.3