Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl evals and JSON

by choroba (Cardinal)
on Mar 17, 2022 at 15:43 UTC ( [id://11142188]=note: print w/replies, xml ) Need Help??


in reply to Perl evals and JSON

What backend does JSON use? JSON::PP or JSON::XS, or even Cpanel::JSON::XS or JSON::backportPP? What version?

Also, you probably want

my @keys = keys %urlparams; # ~~~~

Otherwise, you're processing values, too.

Moreover, you probably want

$input{$key} = HTML::Entities::encode($urlparams{$key}); # ~~~~~~~~~
otherwise there's nothing to store.

Can you share a snippet that actually reproduces your problem? I tried to fix you sample and ran it under JSON::PP, JSON::XS, and Cpanel::JSON::XS, but there were no errors.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-16 05:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found