diff options
| author | martin f. krafft | 2017-02-24 07:41:29 +1300 |
|---|---|---|
| committer | martin f. krafft | 2017-02-24 07:44:48 +1300 |
| commit | 85e74f61af85356830030596e9ff77faf2f7c05f (patch) | |
| tree | 77a667a09e6a910524540da38e9e074bcfda17cc /scripts | |
| parent | 74c036b5a725d8d268ea62ace595bce9d4eaf36f (diff) | |
| download | scripts.irssi.org-85e74f61af85356830030596e9ff77faf2f7c05f.tar.bz2 | |
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 <madduck@madduck.net>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/ctrlact.pl | 8 |
1 files changed, 4 insertions, 4 deletions
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>) { |
