Perl Mojolicious 存储转储

Perl Mojolicious stash dump

如何转储 perl 中的存储

my $my_data =  {
    'me'    =>  {
        'admin' => 'rhaen',
        'desc'  => 'webserver'
    },
    'you' => {
        'admin' => 'hazel',
        'desc'  => 'mailserver'
    }
};
stash(mydata => $my_data);
print Dumper (stash 'mydata');

如何打印 mydata me admin。我试过了 print Dumper (stash 'mydata me'); print Dumper (stash 'mydata'=>['me']); 似乎没有任何效果。正在尝试解决数据发生变化的原因。

我在 Mojolicious::Lite 中尝试了以下方法:

get '/' => sub {
    my $c = shift;
    $c->stash(mydata => $my_data);
    use Data::Dumper; print Dumper($c->stash('mydata')->{me}{admin});
};

输出是

$VAR1 = 'rhaen';