#!/usr/bin/perl -w

use strict;
use warnings;

use DistroMap;
use Source::Shared::CLI;
our @ISA=qw/Source::Shared::CLI/;

my $column=1;

sub cli_container_ref {['DistroMap']};
our @LONGOPT=(
);
our @LONGOPT_POD2USAGE;
__PACKAGE__->get_and_process_cli_options();

my $distromap=DistroMap->new();

while (<>) {
    chomp;
    next unless $_; # empty line ?
    s/^(\s*)//;
    print $1;
    while (s/^(\S+)(\s*)//) {
	my $name=$1;
	my $space=$2;
	my @map=$distromap->multimap_binary_origin2dest($name);
	print join (' ',scalar @map ? @map : $name) , $space;
    }
    print "\n";
}

=head1	NAME

distromap-filter-translate-binary-names - 

=head1	SYNOPSIS

B<distromap-filter-translate-binary-names>
[<other options, see --help>]

=head1	DESCRIPTION

B<distromap-filter-translate-binary-names> 

=head1	OPTIONS

=over

=item	B<-h, --help>

Display other options, display this help and exit.

=back

=head1	AUTHOR

Written by Igor Vlasenko <viy@altlinux.org>.

=head1	COPYING

Copyright (c) 2009-2017 Igor Vlasenko, ALT Linux Team.

This is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

=cut
