view _test/repo.pl @ 2:f2a86753b494

implemented object model robust validation
author cin
date Tue, 22 Oct 2013 16:15:22 +0400
parents
children ae61af01bfa5
line wrap: on
line source

#!/usr/bin/perl
use strict;

$ENV{http_proxy} = "http://10.111.0.3:3128";

use IMPL::require {
	Repository => 'Yours::Model::Repository',
	Sync => 'Yours::SyncRepository',
	Dumper => 'Data::Dumper',
	
};

my @repos = (
	{
		name => 'gnome',
		dir => 'gnome',
		location => 'http://download.opensuse.org/repositories/GNOME:/STABLE:/3.8/openSUSE_12.3/'
	}
);

foreach my $info ( @repos ) {
	eval {
		my $repo = Repository->new( map $info->{$_},qw(name dir location));
		Sync
			->new(*STDOUT) # log to STDOUT
			->Update($repo);
	};
	warn $@ if $@;
}


print "SUCCESS\n";