Mason perl JSON module refuse to work

221 Views Asked by At

I'm using Mason in one of my projects and I have a problem using the module JSON.

The page search.mhtml is working properly with other external modules (use DBI) but whenever I use the following code, the browser is giving me an error "No data received":

no data received

here is my code:

<%once>

use strict;
use JSON;

</%once>

bla

The script is just printing "bla" after the "<once>" tag ... and that's it .. When I remove the "use JSON" it's working ...

Any ideas?

1

There are 1 best solutions below

0
On BEST ANSWER

Solved !

After debugging the JSON module I noticed it get stuck when trying to load the module JSON::XS.

I installed it and now everything works... FYI.