NAME
Marlin::Role - Marlin, but it's a role
SYNOPSIS
use v5.20.0;
package My::Role {
use Marlin::Role 'foo', -requires => [ 'bar' ];
}
use My::Class {
use Marlin -with => [ 'My::Role' ];
sub bar { return; }
}
my $obj = My::Class->new( foo => 42 );
DESCRIPTION
Marlin::Role supports the same options as Marlin, but is intended for creating roles. It is a fairly thin wrapper around Role::Tiny but performs one additional task: copies any attributes from the role into any Marlin class or Marlin role that consumes it.
BUGS
Please report any bugs to https://github.com/tobyink/p5-marlin/issues.
SEE ALSO
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2025 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.