HomePage RecentChanges LWP JSON

Quick script to present pretty printed JSON from a GET request

use perl5i::2;
use LWP::Simple;
use JSON;

my $data = get(shift) || die("Failed to get URL $!");
my $json = JSON->new->allow_nonref;
say $json->pretty->encode( $json->decode( $data ) );

Software error:

Can't locate object method "endform" via package "CGI" at /data/scott.dd.com.au/wiki/modules/search.pl line 15.

For help, please send mail to the webmaster (webmaster@dd.com.au), giving this error message and the time and date of the error.