use strict; use warnings; use JSON::Parse 0.38; use Data::Dumper; my $j = JSON::Parse->new(); # no complain, no effect: $j->warn_only(1); # legal json: my $pl = $j->run('{"k":"v"}'); print Dumper($pl); print "I am not dead 1\n"; # illegal json, the following statement dies: $pl = $j->run('illegal json'); print Dumper($pl); print "I am not dead 2\n";