这是我的 Perl 程序
package ABCD;
use base qw/JSON::XS/;
my $json = '{"alphabet" : ["a:1", "b:2", "c:3", "d:4"],"number" : ["1:a","2:b"]}';
my $decoded = decode_json($json);
当我执行此操作时,我收到一个错误,例如
&test::decode_json
在 test.pm 第 4 行第 1 行调用的未定义子例程<STDIN>
。