Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11592 - in /trunk/sat-solver/bindings/perl/tests: pool.pl solver.pl
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Thu, 06 Nov 2008 14:24:15 -0000
  • Message-id: <20081106142415.8D7F92F2BF@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Thu Nov 6 15:24:15 2008
New Revision: 11592

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11592&view=rev
Log:
- make it look more like perl

Modified:
trunk/sat-solver/bindings/perl/tests/pool.pl
trunk/sat-solver/bindings/perl/tests/solver.pl

Modified: trunk/sat-solver/bindings/perl/tests/pool.pl
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/perl/tests/pool.pl?rev=11592&r1=11591&r2=11592&view=diff
==============================================================================
--- trunk/sat-solver/bindings/perl/tests/pool.pl (original)
+++ trunk/sat-solver/bindings/perl/tests/pool.pl Thu Nov 6 15:24:15 2008
@@ -8,11 +8,11 @@
# Test for 'Pool' class of sat-solver perl bindings
#
my $pool = new satsolver::Pool || die;
-$pool -> set_arch( 'i686' );
+$pool->set_arch('i686');

# $pool->count_repos == 0
# $pool->size == 1

$pool->prepare();

-my $system = $pool->find( 'system:system' ) || die;
+my $system = $pool->find('system:system') || die;

Modified: trunk/sat-solver/bindings/perl/tests/solver.pl
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/perl/tests/solver.pl?rev=11592&r1=11591&r2=11592&view=diff
==============================================================================
--- trunk/sat-solver/bindings/perl/tests/solver.pl (original)
+++ trunk/sat-solver/bindings/perl/tests/solver.pl Thu Nov 6 15:24:15 2008
@@ -9,34 +9,34 @@

# Create Pool and Repository
my $pool = new satsolver::Pool;
-$pool -> set_arch( 'i686' );
-my $repo = $pool -> create_repo('repo');
+$pool->set_arch('i686');
+my $repo = $pool->create_repo('repo');

# Add Solvable to Repository
-$repo -> add_solv ("tmp/primary");
+$repo -> add_solv("tmp/primary");
# close(F) || die;

# Create Solver
-my $solver = $pool -> create_solver();
+my $solver = $pool->create_solver();

# Create dependencies to provides table
-$pool -> prepare();
+$pool->prepare();

# Create Transactions
-my $job = $pool -> create_transaction();
+my $job = $pool->create_transaction();

# Push jobs on Queue
-my $pat = $pool -> find( "pattern:default" ) || die;
-$job -> install( $pat );
+my $pat = $pool->find("pattern:default") || die;
+$job->install($pat);

# $job -> install( "pattern:default" );

# Solve the jobs
-$solver -> solve ($job);
+$solver->solve($job);

# Print packages to install
-$a = $solver -> getInstallList();
-foreach my $c (@{$a}) {
- print "$c\n";
+$a = $solver->getInstallList();
+for my $c (@$a) {
+ print "$c\n";
}


--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages