Badger...:Class(3pm)

πŸ“¦
version 0.16 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute

✨ 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 (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::Base
  • Badger::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