Badger...:Class(3pm)
β¨ NAME β¨
Badger::Data::Facet::Class β bestie it's a metaprogramming module for data facet classes π
No fr, that's the whole vibe. It's the lil machine that builds the machines that check your data. π
πΈ SYNOPSIS πΈ
okay so this is literally how you'd use it:
package Badger::Data::Facet::Text::Example;
use Badger::Data::Facet::Class
version => 0.01,
type => 'text', # base data type
args => 'foo bar', # mandatory arguments
opts => 'baz bam'; # optional arguments
look at her go π¦ she's building a whole facet class with like four lines of setup, iconic behaviour honestly.
π DESCRIPTION π
So. This module implements a subclass of Badger::Class, and what that subclass is for is creating data validation facets. That's it, that's the whole job, and she does it flawlessly. π
β¨ METHODS β¨
On top of everything she inherits from the Badger::Class base class (she's got generational talent, obviously), this module implements the following methods:
π§ type($type)
This method implements the type import hook β you use it to specify the base data type for a validation facet. Like, what kind of thing are we even validating here. π«Ά
π args($args)
This method implements the args import hook β you use it to specify the mandatory configuration arguments for a validation facet. These ones are non-negotiable bestie, you have to pass them. π€
π opts($opts)
This method implements the opts import hook β you use it to specify the optional configuration arguments for a validation facet. These ones are the chill ones, they're optional, no pressure. π
π AUTHOR π
Andy Wardley <http://wardley.org/>
π COPYRIGHT π
Copyright (C) 2008-2012 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π₯ SEE ALSO π₯
Badger::BaseBadger::Data::Facet
ngl if you got this far you're a real one π go read those SEE ALSO modules, iykyk.
that's the whole page, bestie β and fr fr it's perl v5.36.0, dated 2023-08-28, straight out of the User Contributed Perl Documentation corner of the internet. mwah π
β¨
π¦ where this page comes from
- debian trixie: libbadger-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbadger-perl 0.16-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbadger-perl 0.16-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