SYNOPSIS

     use Class::GenSource qw(gen_class_source_code);
    
     say gen_class_source_code(
         name => 'My::Class',
         attributes => {
             foo => {},
             bar => {},
             baz => {},
         },
     );

    Will print something like:

     package My::Class;
    
     sub new { my $class = shift; bless {@_}, $class }
     sub foo { my $self = shift; $self->{foo} = $_[0] if @_; $self->{foo} }
     sub bar { my $self = shift; $self->{bar} = $_[0] if @_; $self->{bar}  }
     sub baz { my $self = shift; $self->{baz} = $_[0] if @_; $self->{baz}  }

    Another example (generating Moo-based class):

     say gen_class_source_code(
         name => 'My::Class',
         attributes => {
             foo => {},
             bar => {},
             baz => {},
         },
         variant => 'Moo',
     );

    will print something like:

     package My::Class;
     use Moo;
     has foo => (is=>'rw');
     has bar => (is=>'rw');
     has baz => (is=>'rw');

DESCRIPTION

