尝试通过以下方式使用CPAN_JSON:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-touchspin/4.2.5/jquery.bootstrap-touchspin.min.js"></script>
<input id="demo1" type="text" value="0" name="demo1">
并出现以下错误;
my $integer = 200;
JSON->new->allow_nonref->encode($integer);
来自:
https://metacpan.org/source/MAKAMAKA/JSON-2.90/lib/JSON/backportPP.pm#L408
运行perl 5.8时,我认为始终包含Can't locate object method "FLAGS" via package "B::IV"
核心软件包。任何想法为什么会这样?
编辑:
B
这是perl,v5.10.1
perl -v | grep This
2.27200
perl -MJSON::backportPP -le'print $JSON::backportPP::VERSION || $JSON::PP::VERSION'
266498