Help for this page

Select Code to Download


  1. or download this
    package Foo;
    use Moose;
    
    has data (is => 'rw');
    
  2. or download this
    my $foo = Foo->new(data => { this => 1, that => 2 });
    $foo->this #  returns $foo->data->{this}
    $foo->that(10) # sets $foo->data->{that} = 10