NAME
Marlin::Manual::Principles - getting the most out of Marlin
DESCRIPTION
Following this advice will help you get the most out of Marlin:
Aim for objects to be immutable. Mutable objects are a foot gun. Marlin defaults to attributes being "ro" for a reason.
Type coercions are nice, but will slow down your constructor so should be used sparingly.
Eager defaults/builders will slow down your constructors. If you want fast constructors, use lazy defaults/builders.
Lazy defaults/builders will slow down your accessors. If you want fast accessors, use eager defaults/builders.
Sorry you can't have it both ways. Though see: https://github.com/tsee/Class-XSAccessor/pull/14.
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.