If you don't mind sacraficing compatability to do this than you can make your method 'lvalue'able. This only works with perl 5.6 and higher. sub option : lvalue { shift->{options}->{shift()} }
Then you can get values as you normaly would and set values with $object->option('new') = 'bar';
But if you do this please include use 5.6.0; at the top of your code.