Test::S...llection(3)

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

πŸŽ€ NAME πŸŽ€

Test::Smoke::App::AppOptionCollection β€” bestie, it's literally just a collection of AppOption objects. That's it, that's the whole gig. πŸ’…

(It lives in section 3 of the User Contributed Perl Documentation, in case you were wondering where to find her. πŸ¦‹)


✨ DESCRIPTION ✨

okay so picture this: you've got a bunch of Test::Smoke::App::AppOption objects and nowhere cute to put them. Enter AppOptionCollection. She holds them. She hands them back. She's the friend group of data structures. 🫢

Let's go method by method, no skipping, periodt.

🌸 Test::Smoke::App::AppOptionCollection->new()

The constructor, the origin story, the main character. ✨

Arguments

An optional list of Test::Smoke::App::AppOption objects. Optional!! So you can pass zero, or a whole squad. Your call, queen. πŸ’œ

Returns

An instatiated object. (Yeah, that spelling is the source's, not mine, I would never πŸ’€ β€” the object itself is fully alive and thriving tho.)

Exceptions

None. Not a single one. So chill. πŸ“

🌸 $collection->add(@arguments)

Adds the Getopt::Long option and its default to the collection. She also adds the Test::Smoke::App::AppOption-show_helptext()> β€” yes, that's written exactly like that in the source, I am not touching it, no cap πŸ™ˆ β€” to the running helptext variable.

Arguments

A list of Test::Smoke::App::AppOption objects.

Returns

The object. She gives herself back so you can chain. Iconic behavior, honestly. πŸ‘‘

Exceptions

None.

🌸 $collection->add_helptext($string)

Adds a string to the currently build up helptext variable. (And "build up" is the original's wording too, I'm just the messenger 🧚)

🌸 $collection->options_with_default()

Arguments

None

Returns

A hasref to a struct with only the defaults set from object construction. (Again: source spelling, I'm being faithful, don't come for me 😭)

🌸 $collection->options_for_cli()

Arguments

None

Returns

A hashref with options that have a CODEref as default.

Exceptions

None

🌸 $collection->all_options()

Arguments

None.

Returns

A hashref with all options and theire coded default.

Exceptions

None.


(c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.

With contributions from Jarkko Hietaniemi, Merijn Brand, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell. Absolute legends, every single one. 🌈

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

See:

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Like, fr fr, it comes as-is. 😀

and that's the whole page, bestie πŸ’– this was perl v5.42.0, dated 2025-07-25, and it's still Test::S...llection(3) to the very end. go forth and collect your options. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from