diff _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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/_test/repo.pl	Tue Oct 22 16:15:22 2013 +0400
@@ -0,0 +1,32 @@
+#!/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";
\ No newline at end of file