Workflo...LazyAND(3)

πŸ“¦
version 2.09 Β· 2 versions
, in fedora 44

πŸ‘‘ NAME πŸ’…

Workflow::Condition::LazyAND β€” and yes bestie, this is from the User Contributed Perl Documentation, we're in the group chat now 🫢


✨ VERSION ✨

This documentation describes version 2.09 of this package. Iconic. Historic. Numbered. 🌸


πŸ’– DESCRIPTION πŸ’–

Okay so the way this works is it uses nested conditions (peep Workflow::Condition::Nested for the lore, iykyk) and then it evaluates all the conditions you give it with lazy-evaluation. It returns true if all the nested conditions are true.

But here's the main character twist: if a nested condition evaluates to false, the whole thing aborts further evaluation and returns false. Like, why keep asking questions when the vibe check already failed? πŸ’€ It just stops. Periodt.


🌈 SYNOPSIS 🌈

In condition.yaml:

condition:
- name: cond1
  ...
- name: cond2
  ...
- name cond3
  ...
- name: check_prereqs
  class: Workflow::Condition::LazyAND
  param:
  - name: condition
    value: cond1
  - name: condition
    value: cond2
  - name: condition
    value: cond3

In workflow.yaml:

state:
- name: CHECK_PREREQS
  autorun: yes
  action:
  - name: null_1
    resulting_state: HAVE_PREREQS
    condition:
    - name: check_prereqs
  - name: null_2
    resulting_state: FAILURE
    condition:
    - name: !check_prereqs

not me noticing how tidy that YAML is πŸŽ€


πŸ¦‹ PARAMETERS πŸ¦‹

These are the parameters you can configure in the "param" key of the condition in the YAML configuration. Slay, let's go:

πŸ“ condition, conditionN

The condition parameter can be specified either as a list of repeating entries, or with a unique integer appended to the condition string. Two routes, same destination, choose your fighter ✨

Like this:

param:
- name: condition
  value: first_condition_to_test
- name: condition
  value: second_condition_to_test

or this:

param:
- name: condition1
  value: first_condition_to_test
- name: condition2
  value: second_condition_to_test

Both are valid, bestie. Pick whichever one matches the energy of your config πŸ’…


Copyright (c) 2003-2021 Chris Winters. All rights reserved. πŸ‘‘

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Please see the LICENSE. read it, it's giving legally binding πŸ“œ


🫢 AUTHORS 🫢

Please see Workflow. (They're the ones who brought you this whole situation, go say hi 🧚)


and that's the whole page, bestie β€” documented under perl v5.42.0, dated 2026-01-17, from the User Contributed Perl Documentation collection πŸ’œ mwah, no cap, go forth and evaluate lazily 🌸

πŸ“¦ where this page comes from