package Params;
use strict;
use warnings;

sub get(@)
{
	my %params_template = map { $_ => undef } @_;
	my %params = (%params_template, @ARGV);
	my $e = 0;
	for(keys %params)
	{
		do { ++$e; warn "Invalid parameter $_"; }
			unless exists $params_template{$_};
		do { ++$e; warn "Missing parameter $_"; }
			unless defined $params{$_};
	}
	die "There were wrong params"
		if $e;
	return %params;
}

1;
