Skip Menu |

This queue is for tickets about the Commands-Guarded CPAN distribution.

Report information
The Basics
Id: 8637
Status: open
Priority: 0/
Queue: Commands-Guarded

People
Owner: treyharris [...] gmail.com
Requestors: treyharris [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: add support for preconditions
It should be possible to set a precondition for a C<using> block in a step. Of course, any step run previously comprises a precondition, but it may be desirable to be explicit about it: step sshKeys => ensure { -f ".ssh/identity" } presuming { -x "/usr/bin/ssh-keygen" } using { system "ssh-keygen -t rsa1" } ; C<presuming> should also take a step argument: my $installSSH = step installSSH => ...; step sshKeys => ensure { -f ".ssh/identity" } presuming $installSSH, using { system "ssh-keygen -t rsa1" } ; possibly with arguments: step sshKeys => ensure { -f ".ssh/identity" } presuming $installSSH->with(@args), using { system "ssh-keygen -t rsa1" } ; and if presuming returns a Commands::Guarded object, it should use that as the precondition: step sshKeys => ensure { -f ".ssh/identity" } presuming { $installSSH->with(@_) # Use same args as ensure and using } using { system "ssh-keygen -t rsa1" } ;