package VineLinux::VSS::ConfigLoader;

use strict;
use warnings;

use YAML;

sub new {
    my $class = shift;
    bless {}, $class;
}

sub load {
    my ($class, $file, $vss) = @_;

    my $config;
    if ((!ref($file)) || (-e $file && -r $file)) {
	$config = YAML::LoadFile($file);
    }

    if ($config->{packager_name}) {
	$vss->packager_name($config->{packager_name});
    }
    if ($config->{packager_fullname}) {
	$vss->packager_fullname($config->{packager_fullname});
    }
    if ($config->{packager_email}) {
	$vss->packager_email($config->{packager_email});
    }
}



1;
