package Getter; use overload '%{}' => 'Getter::as_hash', '@{}' => 'Getter::as_array', ; sub as_hash { my ($self) = @_; # return tied hash }; sub as_array { my ($self) = @_; # return tied array }; sub AUTOLOAD { # Map to hash access } package Getter::TiedArray; # Copy the code from MozRepl::RemoteObject and gut the remote functionality package Getter::TiedHash; # Copy the code from MozRepl::RemoteObject and gut the remote functionality