Mail::SPF::Base(3)

πŸ’– Mail::SPF::Base πŸ’–

okay bestie, so this is the base class situation for every single class in the Mail::SPF fam β€” the blueprint, the origin story, the mother of all classes. it's called Mail::SPF::Base, and she's serving main character energy as the shared parent of them all. πŸ‘‘

version? 3.20260331. write it down. ✨


🌸 SYNOPSIS 🌸

here's how you actually use her, verbatim, no notes:

use base 'Mail::SPF::Base';

sub new {
    my ($class, @options) = @_;
    my $self = $class->SUPER::new(@options);
    ...
    return $self;
}

like, that's the whole vibe. you inherit, you call SUPER::new, you do your lil custom stuff, you return the object. slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Mail::SPF::Base is the common base class for all the Mail::SPF classes. everyone's ancestor, no cap. 🫢

πŸŽ€ Constructor

here's the constructor she's got for you:

  • new(%options) β€” returns Mail::SPF::Base

so what does it do? it creates a brand-new object of whatever class you invoked the constructor on. and all those %options you handed over? they get stored as key/value pairs right inside the new object. cute, right? πŸ“

oh and plot twist β€” you can also call the new constructor on an object, and in that case the object gets cloned. any options you pass in will override the ones from the old object. it's giving glow-up but make it a deep-ish copy. πŸ™ˆ

heads up: there are no common options defined in Mail::SPF::Base. like, zero. the option menu is empty. iconic of her honestly.

⭐ Class methods

the following class methods are provided:

  • class β€” returns string

returns the class name of the class or the object that it was invoked on. yes, it works both ways. versatile queen. πŸ‘‘

⭐ Class methods

(yeah bestie, this heading shows up twice in the original and i am NOT about to erase her. we keep every single thing. πŸ’€)

the following class methods are provided:

  • make_accessor($name, $readonly) β€” returns code-ref

this one creates an accessor method in the class it was invoked on. the accessor gets the given $name, and it accesses the object field with that same name. and if $readonly is true? the accessor is made read-only. locked down, no edits, periodt. πŸ”₯

🌈 Instance methods

there are no common instance methods defined in Mail::SPF::Base.

nope. none. nada. she's minimal, she's mysterious, she contains multitudes but not methods. πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

  • Mail::SPF

and for the tea on availability, support, and license info? go read the README file that ships with Mail::SPF. it's all in there, iykyk. πŸ“–βœ¨


πŸ’œ AUTHORS πŸ’œ

  • Julian Mehnle <julian@mehnle.net>
  • Shevek <cpan@anarres.org>

two legends. we stan. 🌟


and that's the whole page bestie, hope it ate πŸ’– this was Mail::SPF::Base from perl v5.42.1, dated 2026-04-23, and honestly? she's short, she's sweet, she's the foundation of everything. go forth and subclass responsibly. mwah. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from