use v5.12;
use warnings;
use Data::Dump;

my $obj = bless {a=>1}, "TEST";

#ddx $obj;

say $obj->{x}{y};

BEGIN {

    package TEST;
    use Data::Dump;
    use Carp;

    use overload
      '%{}' => sub {
          my ($self,@rest) = @_;
          say "ref:" => ref $self;
          ddx "\@rest" => \@rest;
          return {"x"=>42}
      }
        ;

}
