Cataly...daptor(3pm)

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

πŸ’… NAME πŸ’…

Catalyst::Helper::Model::Adaptor β€” the helper for the incredibly lazy ✨


🌸 SYNOPSIS 🌸

okay so bestie, you run this:

./script/myapp_create.pl model SomeClass Adaptor MyApp::Backend::SomeClass create

and it's gonna make you a YourApp::Model::SomeClass that looks exactly like this:

package YourApp::Model::SomeClass;
use strict;
use warnings;
use base 'Catalyst::Model::Adaptor';

__PACKAGE__->config(
    class       => 'MyApp::Backend::SomeClass',
    constructor => 'create',
);

1;

and honestly? why you'd need a whole script to generate that is beyond me. but here it is anyway 🫢


πŸŽ€ ARGUMENTS πŸŽ€

./script/myapp_create.pl model <model_name> Adaptor <class> [<constructor>]

so you gotta specify the model_name (that's the name of the model, duh πŸ’…) and class, which is the class being adapted.

now if $class->new isn't gonna do the thing you want it to do, just pass the name of $class's constructor as constructor. slay, problem solved πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Jonathan Rockway <jrockway@cpan.org> ✨


🌈 LICENSE 🌈

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. fr fr 🧚

No copyright claim is asserted over the generated code. periodt πŸ’œ


and that's the whole vibe check, bestie πŸ’… this was perl v5.34.0, dated 2022-06-09, and it's giving Catalyst::Helper::Model::Adaptor(3pm) main character energy. no cap, go adapt something iconic πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from