Test::...:Struct(3pm)

πŸ“¦
version 0.0306 Β· 2 versions
, in fedora 43

πŸ’– 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_name up by 1. That's the whole thing. Increment, up, plus one. ⭐
  • $struct->add_to_field($field_name, $difference) β€” takes $difference and 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::Base
  • Test::Run::Obj
  • Test::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