Excel:...itional(3pm)
β¨ NAME β¨
Excel::Template::Container::Conditional β bestie, that's the whole name, that's the whole vibe π
This page lives in the User Contributed Perl Documentation, section 3pm (iykyk, that's where the Perl module manpages hang out π).
πΈ PURPOSE πΈ
It gives you conditional execution of children nodes. Like, the kids only run if the vibe check passes. π¦
π NODE NAME π
IF
π§ INHERITANCE π§
CONTAINER
π ATTRIBUTES π
NAMEβ this is the name of the parameter you're testing. It gets resolved like literally any other parameter name would be. (q.v.VARfor more info, go look it up bestie π)VALUEβ ifVALUEis set, then a comparison operation happens. The value ofNAMEgets compared toVALUEusing whateverOPis. πOPβ ifVALUEis set, then this is checked. If it's not present, then'=='(numeric equality) is just assumed, no biggie.OPhas to be one of Perl's numeric comparison operators or the string comparison operators. All 6 of each kind is supported. β¨
β οΈ Note: if you wanna use<or<=, you have to use<or<=instead. This is to make sure it will parse withXML::Parser. You should not need to use>or>=instead of>and>=, respectively. Not me warning you about XML entity drama π
ISβ ifVALUEis not set, thenISgets checked.ISis allowed to be either"TRUE"or"FALSE". The boolean value ofNAMEis checked againstIS. Periodt. π
π«Ά CHILDREN π«Ά
None β it's giving childless, and honestly? iconic. π
π EFFECTS π
None π
β DEPENDENCIES β
None π
π USAGE π
<if name="__ODD__" is="false">
... Children here
</if>
So in the above example, the children will be executed if the value of __ODD__ (which is set by the LOOP node, ty bestie) is false. Which means: for all even iterations. Every single even one. Slay. π₯
π AUTHOR π
Rob Kinyon (rob.kinyon@gmail.com)
πΈ SEE ALSO πΈ
LOOP, VAR β go read those too, they're lowkey essential π¦
and that's the whole page bestie!! this one was perl v5.34.0, dated 2022-06-13, and it's out here living as Excel:...itional(3pm) π mwah, go forth and conditionally execute π
β¨
π¦ where this page comes from
- debian bookworm: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libexcel-template-perl 0.34-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms