> I've been thinking about what to do if either the C<ensure> or the <using>
> blocks are missing. Currently the module throws an exception, but I don't
> think that's right. In an earlier draft of the module, I had an "ALWAYS"
> variant that ran the C<using> clause whether or not the C<ensure> was
> present. Surely
>
> step withoutUsing =>
> ensure { -f '/boot/vmunix' }
> ;
>
> should be treated as an assertion: if it's true, go on, if false, throw an
> exception. But
>
> step withoutEnsure =>
> using { mkdir "/net" }
> ;
>
> seems somewhat useless to me. Considering the fact that other blocks may
> exist (sanity/rollback/etc.), perhaps a missing C<ensure> should be
> treated specially so it fails before C<using> and succeeds after. In that
> case
If idempotence is a goal of Commands::Guarded, "ensure" should be a
requirement, period. As a math major, I personally like idempotence.
So, I say that there has to be at least one ensure block for every
step.
> That screams for C<ensure>, but that word's already taken. I'm a little
> bit like Larry in that I think naming is terribly important and much more
> often get stuck on finding the right name than on finding the right
> semantics. :-)
>
> Perhaps someone has a suggestion?
"verify"
Rob
_______________________________________________
sw-design mailing list
[EMAIL PROTECTED]
http://metaperl.com/cgi-bin/mailman/listinfo/sw-design