This is yet more puzzlement about a large and almost-completely-undocumented Perl application I'm working on.

There's a cron-like process which runs constantly, polling for jobs. When it gets a job, it instantiates one of various modules (depending on the job type) and runs some processes.

My current puzzle is this. In some of the modules, to figure out what's happening, I can put pretty crude logging along the lines of:

use Data::Dumper; open(LOG,'>>','/some/log/file.log') or die "can't log"; print LOG 'Some object: ' . Dumper($some_object); close(LOG);

I'm aware this is far from ideal but it should work, right?

But in some of the modules, when I add this, I get no output at all. It doesn't die, it doesn't fail, the operation concludes. In others it works and I get output. There's definitely nothing wrong with the logfile, its location and permissions etc. all allow it to be written to.

The modules which apparently can't do output are mostly ones to do with an API which fetches JSON from AWS.

Where can I start looking to figure out why this would be?


In reply to Why can't some of my modules do log output to a file? by LittleJack

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.