Workflo...::LazyOR(3)

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

πŸ’– Workflow::Condition::LazyOR πŸ’–

okay bestie, welcome to the manual for Workflow::Condition::LazyOR, which lives in the User Contributed Perl Documentation section of the manual pages (that's section 3, for all my library-function girlies πŸŽ€). pull up a chair, grab a strawberry πŸ“, and let's get into it.


✨ VERSION ✨

this doc is describing version 2.09 of this package. periodt. πŸ’…


🌸 DESCRIPTION 🌸

so here's the vibe: this thing uses nested conditions (peep Workflow::Condition::Nested if you wanna go deeper, iykyk), and it evaluates the conditions you give it using lazy evaluation β€” meaning it returns true at the very first nested condition that comes back true. like, it's not gonna do extra work, she's efficient. πŸ’…

and if all the nested conditions return false? then LazyOR returns false too. that's it, that's the whole personality. πŸ’€


πŸ¦‹ SYNOPSIS πŸ¦‹

first up, in condition.yaml:

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

and then over 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

look at her go. main character energy fr fr. πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

these are the parameters you can configure in the "param" entity of the condition inside your YAML config. let's break it down:

πŸ’œ condition, conditionN

the condition parameter can be specified in either of two ways β€” as a list of repeating entries, or with a unique integer appended onto the condition string. two paths, same destiny, pick your fighter. 🌈

option one, the repeating list:

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

or option two, the numbered girlies:

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

both slay, both valid. 🫢


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


πŸ‘‘ AUTHORS πŸ‘‘

Please see Workflow


ok that's the whole page bestie!! no gatekeeping, every last detail preserved, as she should be. πŸ’–

and a lil sign-off for the record books: this was the Workflo...::LazyOR(3) page from the User Contributed Perl Documentation, generated by perl v5.42.0 on 2026-01-17. literally iconic. go forth and lazy-evaluate, queen πŸ¦‹βœ¨πŸ’…

πŸ“¦ where this page comes from