comparison _test/repo.pl @ 2:f2a86753b494

implemented object model robust validation
author cin
date Tue, 22 Oct 2013 16:15:22 +0400
parents
children ae61af01bfa5
comparison
equal deleted inserted replaced
1:30a88ad2b2fd 2:f2a86753b494
1 #!/usr/bin/perl
2 use strict;
3
4 $ENV{http_proxy} = "http://10.111.0.3:3128";
5
6 use IMPL::require {
7 Repository => 'Yours::Model::Repository',
8 Sync => 'Yours::SyncRepository',
9 Dumper => 'Data::Dumper',
10
11 };
12
13 my @repos = (
14 {
15 name => 'gnome',
16 dir => 'gnome',
17 location => 'http://download.opensuse.org/repositories/GNOME:/STABLE:/3.8/openSUSE_12.3/'
18 }
19 );
20
21 foreach my $info ( @repos ) {
22 eval {
23 my $repo = Repository->new( map $info->{$_},qw(name dir location));
24 Sync
25 ->new(*STDOUT) # log to STDOUT
26 ->Update($repo);
27 };
28 warn $@ if $@;
29 }
30
31
32 print "SUCCESS\n";