我使用 Musicbrainz cpan 模块来查找专辑,但我在尝试破译收到的输出时遇到了一些问题。我使用 data::Dumper 来查看它,它似乎是某种哈希或数组,但是当我尝试检查类型时遇到了问题。
my $ws = WebService::MusicBrainz::Release->new();
my $response = $ws->search({ TITLE => 'ok computer' });
if (ref($response) eq "REF" || ref($response) eq "SCALAR" || ref($response) eq "ARRAY" || ref($response) eq "HASH" || ref($response) eq "CODE" || ref($response) eq "GLOBE")
{
print "\n What sort of thing is it? \n";
}
谢谢