Test::...:Struct(3pm)
π NAME π
Test::Run::Base::Struct β the base class for Test::Run's "structs", which are just simple little classes that hold a bunch of values together. Think of them as cute lil' containers, bestie. π
This page lives in the User Contributed Perl Documentation, under manual name Test::...:Struct(3pm), so likeβ¦ section 3pm energy. π¦
β¨ DESCRIPTION β¨
It inherits from Test::Run::Base. That's it, that's the whole vibe β it's a child class, and it's giving "I got my traits from my parent class." π
π§ BUILD π§
For Moose. Yes, that Moose. π«Ά
πΈ METHODS πΈ
Okay so here's the actual functionality, and ngl it's short but it slays:
$struct->inc_field($field_name)β bumps the slot called$field_nameup by 1. That's the whole thing. Increment, up, plus one. β$struct->add_to_field($field_name, $difference)β takes$differenceand adds it to the slot named$field_name. So like, whatever number you pass in gets added. Math but make it object-oriented. π₯
Heads up bestie: these are methods on the struct, so you call them on an object β not on the class itself. The $struct-> is doing the heavy lifting here. π
π SEE ALSO π
Go check out these siblings if you want the full lore, iykyk:
Test::Run::BaseTest::Run::ObjTest::Run::Core
π LICENSE π
This file is freely distributable under the MIT X11 license. Free as in go wild, fr fr. π
<http://www.opensource.org/licenses/mit-license.php>
π¦ AUTHOR π¦
Shlomi Fish, <http://www.shlomifish.org/>. Iconic behavior, we stan. π
And that's a wrap on this page, bestie β it came from perl v5.42.0, dated 2025-07-25, and it's filed under Test::...:Struct(3pm) in the User Contributed Perl Documentation. Periodt. π
β¨
π¦ where this page comes from
- fedora 43: perl-Test-Run 0.0306-3.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-only AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms