Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: JSON::XS and blessings

by cshavit (Novice)
on Oct 13, 2015 at 19:57 UTC ( [id://1144749]=note: print w/replies, xml ) Need Help??


in reply to Re: JSON::XS and blessings
in thread JSON::XS and blessings

Both servers run the latest. The printf prints 3.01 5.018002

The thing that puzzles me if how could two virtual servers run *anything* different. Wouldn't "use ABC; load the same ABC on both?

I'm asking because evidently *something* is different.

Replies are listed 'Best First'.
Re^3: JSON::XS and blessings
by Your Mother (Archbishop) on Oct 13, 2015 at 20:06 UTC

    true is the problem but I don't know why it's a problem. It roundtrips fine for me with 2.26. :|

      Indeed. Likewise false has a similar problem. Turns out that the other special case, null roundtrips just fine.

      And like I said, everything works fine from a shell command line, and in one of the virtual hosts. It's the other VirtualHost that causes problems.

        Of course null causes no problem; that just gets mapped to undef. true and false get mapped to bless $Class, \$bool. It appears that one of your systems is blessing into a class that is not special-cased in the other direction. Perhaps this is because the TO_JSON() method is not being defined. But, no, I have no idea why it gets defined on one server and not on the other. Surely, there are differences between the servers, despite you thinking that there are none.

        - tye        

Re^3: JSON::XS and blessings
by toolic (Bishop) on Oct 14, 2015 at 14:59 UTC
    I'm asking because evidently *something* is different.
    Some other ideas for checking differences...
    use Data::Dumper; $Data::Dumper::Sortkeys=1; print Dumper(\%ENV); system 'uname -a';

    The code is XS, which means that it requires a C compiler (which may be different).

      Thanks! The environment vars are slightly different (by design) but none of the differences should matter (yeah, I know, famous last words...). The uname is the same.

      The two virtual servers are run by one Apache server, on one machine, under the same username. Yes, JSON::XS is compiled, but the two virtual servers use the same identical binaries.

        That sounds like you're deploying binaries, not building them in situ. I would try installing JSON::XS manually on the problem server in a different directory maybe and comparing the resulting code libs with what's already there. Or, if you can safely do destructive testing, just install it manually in the same place and see if the problem clears up.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found