Venus::Role::Defaultable - Defaultable Role
Defaultable Role for Perl 5
package Example; use Venus::Class 'attr', 'with'; with 'Venus::Role::Defaultable'; attr 'name'; sub defaults { { name => 'example', } } package main; my $example = Example->new; # bless({name => 'example'}, "Example")
This package provides a mechanism for setting default values for missing constructor arguments.
Awncorp, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2022, Awncorp, awncorp@cpan.org.
This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.
To install Venus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Venus
CPAN shell
perl -MCPAN -e shell install Venus
For more information on module installation, please visit the detailed CPAN module installation guide.