MixinF...Factory(3pm)

πŸ“¦
version 0.92 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so bestie, this is Class::MixinFactory::Factory β€” a whole Class Factory with Selection of Mixins. it's from the User Contributed Perl Documentation, and it's giving main character energy fr fr πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe, literally copy-paste this and go:

use Class::MixinFactory::Factory;

my $factory = Class::MixinFactory::Factory->new();

$factory->base_class( "MyClass");

$factory->mixin_prefix( "MyMixins" );
$factory->mixed_prefix( "MyClasses" );

my $class = $factory->class( @mixins );

πŸ¦‹ DESCRIPTION πŸ¦‹

so a mixin factory generates new classes at run-time that inherit from each of several classes. that's the whole thing. it's lowkey iconic honestly. no cap, that's the entire description. ✨


πŸ‘‘ PUBLIC METHODS πŸ‘‘

🌸 new()

$factory_class->new() : $factory
$factory_class->new( %attributes ) : $factory

creates a shiny new factory object for you. 🫢

you can pass it a hash of attributes β€” the key matches one of the supported accessor methods listed below, and the value is the value you wanna assign to it. simple as that.

🌈 base_class()

$factory->base_class() : $package_name
$factory->base_class( $package_name )

Required. get or set the base class that all the mixed classes inherit from. you do NOT skip this one, bestie, it's mandatory.

πŸ“ mixin_prefix()

$factory->mixin_prefix() : $package_name
$factory->mixin_prefix( $package_name )

Optional. get or set a prefix that gets placed before all mixin class names that don't contain a double-colon. defaults to the name of the base class.

πŸ’œ mixed_prefix()

$factory->mixed_prefix() : $package_name
$factory->mixed_prefix( $package_name )

Optional. get or set a prefix placed before all generated class names. defaults to the name of the base class or the factory class, followed by "::AUTO".

πŸ’– class()

$factory->class( @mixins ) : $package_name

finds or generates a class that combines the requested mixin classes. it ate and left no crumbs. πŸ’…


🧚 SEE ALSO 🧚

  • if you want a facade interface that facilitates access to this functionality, go look at Class::MixinFactory.
  • for distribution, installation, support, copyright and license info, check out Class::MixinFactory::ReadMe.

and that's the whole page, babe πŸŽ€ this was MixinF...Factory(3pm) from the User Contributed Perl Documentation, brought to you by perl v5.36.0 on 2022-10-22. periodt. πŸ‘‘πŸ’–

πŸ“¦ where this page comes from