#!/usr/bin/perl
# print the highest package version found in the symbols file read as input

use v5.30;
use warnings;

use Dpkg::Version;

my $highest = 0;
while (<>) {
	my ($version) = /^\s+\S+\s+(\S+)$/;
	next if not $version;
	next if version_compare($highest, $version) == 1;
	$highest = $version;
}

die 'could not find a version number in the input' if not $highest;

say $highest;

