Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^4: Can someone please write a *working* JSON module (modperl sideeffects)

by LanX (Saint)
on Oct 24, 2021 at 18:11 UTC ( [id://11137980]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can someone please write a *working* JSON module
in thread Can someone please write a *working* JSON module

> a wild assertion (paraphrasing, "BLOCK eval causes an order of magnitude(s) slowdown") which runs counter to consensus experience

My guess:

The OP was highlighting a modperl environment, which is notorious for global side effects IIRC.

So if one of the other modperl clients is manipulating the error mechanism, (like setting $SIG{WARN} or CGI::Carp or something homebrewn), this could lead to some slowdown.(Disclaimer: I never tried this, especially never tried modperl)

It's hard to tell why this is triggered by eval {BLOCK} , but this could be connected to ignoring that special variable which indicates the handler was fired inside an eval. (See $^S in perlvar )

All of this is of course not related to JSON ... and switching to another technology like fastcgi or PSGI should fix it.

Tho I wouldn't be surprised if the OP fiddled with error handlers by himself without taking care of $^S

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-25 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found