Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by LanX (Sage)
on Oct 24, 2021 at 18:11 UTC ( #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? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2023-02-08 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?