Help for this page

Select Code to Download


  1. or download this
    # Assume I have foo, bar, and baz as my attributes
    
    ...
    $self->foo(123);     # This sets foo to 123 (and returns $self, to all
    +ow for:
    $self->foo(123)      # chaining of mutator calls
         ->bar(456);
    
  2. or download this
    my %values;
    @values{qw(foo bar baz)} = $self->get(qw(foo bar baz));
    ...
        foo => 123,
        bar => 456,
    );