Help for this page

Select Code to Download


  1. or download this
    has x => ( is => 'rw' );
    around x => \&my_accessor;
    
  2. or download this
    has x => ( is => 'rw', traits => ['MyAccessor']);
    
  3. or download this
    has x => ( isa => 'MyAccessor' );
    
  4. or download this
    package Moose::Meta::Attribute::Custom::Trait::MyAccessor;
    sub register_implementation { return 'MyAccessor' }
    ...
    package MyAccessor;
    use Moose::Role;
    my $meta = __PACKAGE__->meta;
    
  5. or download this
       @list = $obj-> prop;
       $obj->prop(@list);
       $array = $obj->prop;
       $obj->prop($array);
    
  6. or download this
       has prop;
       around prop => \&my_accessor;