Object::TinyDefaults - Object::Tiny[::XS] wrapper that adds default values
package MyClass; use Object::TinyDefaults { foo => 42 } qw(bar bat); package main; my $inst = MyClass->new(bar=>1);
Now MyClass has accessors foo(), bar(), and bat(), and values foo=42 and bar=1.
foo()
bar()
bat()
foo=42
bar=1
Requires Object::Tiny or Object::Tiny::XS. XS will be used if available.
Copyright (c) 2018 Christopher White. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). Details are in the LICENSE file accompanying this distribution.
To install Object::TinyDefaults, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::TinyDefaults
CPAN shell
perl -MCPAN -e shell install Object::TinyDefaults
For more information on module installation, please visit the detailed CPAN module installation guide.