Help for this page

Select Code to Download


  1. or download this
      sub GET::AUTOLOAD { $GET::AUTOLOAD =~ /::(\w+)$/; $_[0]->{ $1 }; }
    
    ...
      bless $h, 'GET';
    
      say $h->foo, $h->bar, $h->doz;
    
  2. or download this
      my $h = { foo => 1, bar => [ 2, { doz => 3 } ] };
      getter($h);
      say $h->foo->[1]->doz; # 3
    
  3. or download this
    use Scalar::Util qw();
    sub GET::AUTOLOAD { $GET::AUTOLOAD =~ /::(\w+)$/; $_[0]->{ $1 }; }
    ...
        }
        $h;
    }