);
$solver->add_rule(
- server => [ 'S' ] => [ member_of => S => [ value => 'servers' ] ]
+ server => [ 'S' ] => [ member_of => S => \'servers' ]
);
my $s = $solver->query([ server => 'S' ]);
is_deeply([ map $_->value_for('S')->{name}, $s->results ], [ sort @servers ]);
$solver->add_rule(
- shell => [ 'S' ] => [ member_of => S => [ value => 'shells' ] ])
+ shell => [ 'S' ] => [ member_of => S => \'shells' ])
->add_rule(name => [ qw(T N) ],
[ constrain => [ qw(T N) ],
sub { $_[0]->{name} eq $_[1] } ]
$s = $solver->query(
[ shell => 'Shell' ],
- [ name => 'Shell', [ value => 'bash' ] ],
+ [ name => 'Shell', \'bash' ],
[ server => 'Srv' ],
[ shell_installed_on => qw(Shell Srv) ],
);
is(paths_for_simple([ is_file => 'PS' ]), '.ssh/authorized_keys');
-is(paths_for_simple([ mode => 'PS', [ value => '0755' ] ]), '.ssh');
+is(paths_for_simple([ mode => 'PS', \'0755' ]), '.ssh');
$solver->add_rule(
path_status_at => [ 'PS', 'P' ],
throws_ok {
$solver->query(
- [ path_status_at => 'PS', [ value => '.ssh' ] ]
+ [ path_status_at => 'PS', \'.ssh' ]
)->results
} qr/ARGH/;
lives_ok {
@res = $solver->query(
- [ path_status_at => 'PS', [ value => '.ssh' ] ]
+ [ path_status_at => 'PS', \'.ssh' ]
)->results
};
}
is(
- paths_for([ path_status => 'PS' ], [ path => 'PS', [ value => '.ssh' ] ]),
+ paths_for([ path_status => 'PS' ], [ path => 'PS', \'.ssh' ]),
'',
'no .ssh entry'
);
-throws_ok { paths_for([ path_status_at => 'PS', [ value => '.ssh' ] ]) }
+throws_ok { paths_for([ path_status_at => 'PS', \'.ssh' ]) }
qr/refused/;
$solver->{observation_policy} = sub { 1 };
is(
- paths_for([ path_status_at => 'PS', [ value => '.ssh' ] ]),
+ paths_for([ path_status_at => 'PS', \'.ssh' ]),
'.ssh',
'observation'
);
delete $solver->{observation_policy};
-lives_ok { paths_for([ path_status_at => 'PS', [ value => '.ssh' ] ]) }
+lives_ok { paths_for([ path_status_at => 'PS', \'.ssh' ]) }
'No observation required anymore';
$path_status{'.ssh/authorized_keys'} = $protos{'.ssh/authorized_keys'};
$solver->{observation_policy} = sub { 1 };
sub dot_ssh_query {
- $solver->query([ directory_at => 'PS' => [ value => '.ssh' ] ]);
+ $solver->query([ directory_at => 'PS' => \'.ssh' ]);
}
is_deeply(
[]
);
-#::Dwarn(paths_for([ directory_at => 'PS', [ value => '.ssh' ] ]));
+#::Dwarn(paths_for([ directory_at => 'PS', \'.ssh' ]));
$solver->add_rule(@$_) for (
[ is_directory => [ qw(PS) ],