NAME

Venus::Role::Defaultable - Defaultable Role

ABSTRACT

Defaultable Role for Perl 5

SYNOPSIS

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")

DESCRIPTION

This package provides a mechanism for setting default values for missing constructor arguments.