Friends of the path of Perl, I am trying to return JSON to javascript in Chrome from an IIS server using Activestate's PLX Perl. For those not familiar, Activestate plx is Perl as a DLL, so IIS can load it once and use it many.
I can get JSON return to work with a simple Perl CGI script
use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); use JSON; my $c=CGI->new(); print $c->header('application/json'); my $json = JSON->new->relaxed->pretty; my $data = { this => 'test', is => 'simple'}; print $json->encode( $data );
That works fine as .pl using perl.exe. However when I change the extension to .plx, which IIS is configured to run with the perlis.dll, it still runs, but its return is seen as a string in the browser, not a JSON object. If I leave in the print headers, I get the content type in the string, if I remove it (ISAPI is not CGI) I still just get a string with the Json data.
Is anyone out there familiar with this 'technology' and able to give some guidance.
Cheers,
R.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |