- or download this
package Equation_Problem;
use Moose;
...
print $math_problem->c # prints 9
$math_problem = new Equation_Problem(c => 7, b => 4);
print $math_problem->a #prints 3
- or download this
default => sub{$_[0]->a + $_[0]->b}
- or download this
default => sub{$_[0]->c - $_[0]->b}
- or download this
has 'full_name' => (
...
},
);