Hi All

I have a rather elementary setup
[apache(1.3.12)/mod_perl(1.24)/perl(5.6.0)/rhat(6.1)] which allows user to
request reports. My mod_perl handler retrieves the data from db2 and
generates either a text or a pdf-based report which is written out to a
file. The object that generates the report returns the full path of the
file to the handler which converts it to a URI and sends a REDIRECT to the
browser. This has been working as expected for about 6 months. Last week I
added a new report, which is just a clone of the others (which are perl
objects), and the text version sometimes fails to write the header on the
first page. I've tried putting "local $- = 0" right before the report
format is set up (which happens every time the report is run), but that
shouldn't be necessary (and doesn't fix it). I now see in the mod_perl
guide:

CGI to mod_perl Porting. mod_perl Coding guidelines.

                             Using format() and write()

         The interface to filehandles which are linked to variables with
Perl's tie() function is not yet complete. The format() and write()
functions are missing. If you configure Perl with sfio, write() and
format() should work just fine.

        Otherwise you could use sprintf() to replace format(): ##.##
becomes %2.2f and ####.## becomes %4.2f.

         Pad all strings with (" " x 80) before using, and set their length
with: %.25s for a max 25 char string. Or prefix the string with (" " x 80)
for right-justifying.


Is this my problem? If not, does anyone have any suggestions as to where I
might find the answer? I've been through most of my books and have not
found any clues.

TIA
Bill


Reply via email to