Test::...TagSpec(3pm)

πŸ“¦
version 0.87 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

okay so bestie, meet Test::BDD::Cucumber::Model::TagSpec β€” that's the whole thing, module name and all, and this right here is its 3pm manual page. What does it do? It encapsulates tag selectors. That's the job. That's the gig. πŸ’…


✨ VERSION ✨

It's giving version 0.87, periodt. πŸŽ€


πŸ’€ STATUS πŸ’€

DEPRECATED, bestie. I'm so serious. 😭

This module's whole functionality has been superseded by Cucumber::TagExpressions β€” a module published by the Cucumber project, and it comes with cross-implementation tests to achieve overall consistency. So like... the glow-up already happened. She's retired but we still love her. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

The mission statement, fr fr: try and deal with the crazy-sauce tagging mechanism in a sane way. That's it. That's the dream. 🌈


🌸 OVERVIEW 🌸

Cucumber tags are all sortsa crazy. And ngl, this appears to be a direct result of trying to shoe-horn the syntax in to something you can use on the command line. Because 'Cucumber' is the name of a gem, an application, a language, a methodology, etc etc etc β€” look of disapproval. πŸ™ˆ

Here's some further reading on how it's meant to work: https://github.com/cucumber/cucumber/wiki/Tags. This is obviously a little insane. πŸ’€

Here's how they work here, on a code level: you pass in a list of lists that look like Lisp expressions, with a function: "and", "or", or "not". You can nest these to infinite complexity, but the parser is pretty inefficient, so don't do that. And the "not" function accepts only one argument. No extras, she's picky. βœ‹

eg:

@important AND @billing: "<[and =" 'important', 'billing']>>

(@billing OR @WIP) AND @important: "<[ and =" [ or => 'billing', 'wip' ], 'important' ]>>

Skipping both @todo and @wip tags: "<[ and =" [ not => 'todo' ], [ not => 'wip' ] ]>>

πŸ‘‘ ATTRIBUTES πŸ‘‘

πŸŽ€ tags

An arrayref representing a structure like the above. Like, the whole nested-lists situation from up top. πŸ’–

TagSet->new({
       tags => [ and => 'green', 'blue', [ or => 'red', 'yellow' ], [ not => 'white' ] ]
})

🧚 METHODS 🧚

πŸ“ filter

Filter a list of Scenarios by the value of "tags". So you hand her the scenarios, she hands back the ones that match. Slay. ✨

my @matched = $tagset->filter( @scenarios );

If "tags" is empty, no filtering is done. She just lets everybody through the velvet rope, no questions asked. 🫢


🌟 reminder bestie: this whole module is DEPRECATED β€” go check out Cucumber::TagExpressions instead, okay? iykyk.

and that's the whole page, my love β€” brought to you by perl v5.40.1, dated 2025-05-29. read it, love it, go use the newer module. mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from