Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Update: I've completely replaced my answer; find the old one in readmore tags below.

Imagine you were a scientist. You research the question whether a new web server caused some changes, or if it was the code organization (or both, or neither of these reasons).

As a scientist, it's your duty to design and run an experiment to decide that question. And since you are a lazy scientist, you chose the simplest experiment that you can think of. Not only does that mean you have less work doing the experiment, but it also means you don't have to write so much when you submit your paper for review.

So, which experiment could you do? A quick brainstorming:

  • Run the old code on the new webserver. If it works, the webserver is to blame.
  • Run the new code on the old webserver. If it works, the webserver is to blame.
  • Dump and inspect the contents of %ENV in the top-level CGI script on the new webserver (not in the module
  • Ask on perlmonks

It really depends on your setup if the first two possible experiments are simple, but the third one certainly is.

The fourth has the problem that perlmonks doesn't know your problem too well, and even if they solve the problem for you, you can't submit your paper in the end.

Want to debug your code? Think like a scientist. Start now!

Old answer:

%ENV is a global variable, which means it's identical in all parts of your process (except when localized somewhere).

That makes it likely that the new server is to blame. Just dump %ENV on the new server in the top-level CGI script, and see if it's what you expected. Then you'll know if the new server or the module boundary is responsible.


In reply to Re: %ENV in a .pm versus .cgi ? by moritz
in thread %ENV in a .pm versus .cgi ? by goofball

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (5)
    As of 2014-12-27 01:25 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (176 votes), past polls