Re: Strange mod_perl output problem - Followup

2000-05-01 Thread Matt Sergeant

On Mon, 1 May 2000, Stas Bekman wrote:

> On Mon, 1 May 2000, Hughes, Ralph wrote:
> 
> > OK,
> > After further investigation, it seems that Oraperl/DBI/DBD, etc. are not at
> > fault!
> > I'm formatting the data for display using Perl formats and displaying it as
> > pre-formatted output using  tags.  
> 
> http://perl.apache.org/guide/porting.html#Using_format_and_write_

Ah so that's why I couldn't get it to work!!!

I was trying to solve this yesterday, and was completely bamboozled why
even the $^A and formline implementation didn't work (although I might
have been doing something wrong). Anyway, the solution I came up with was
just sprintf:

##.## becomes %2.2f
.## 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.

Works like a charm.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: Strange mod_perl output problem - Followup

2000-05-01 Thread Stas Bekman

On Mon, 1 May 2000, Hughes, Ralph wrote:

> OK,
> After further investigation, it seems that Oraperl/DBI/DBD, etc. are not at
> fault!
> I'm formatting the data for display using Perl formats and displaying it as
> pre-formatted output using  tags.  

http://perl.apache.org/guide/porting.html#Using_format_and_write_

> This works great for CGI, but mod_perl seems to be having trouble with the
> write() calls to dump the data.  Again, there are no errors, but no output
> either.
> Anyone have any experience with this??
>  
> Please CC replies to my email address.   
> Thanks in advance!  
> -
>  
> I have several CGI scripts that I am in the process of moving to a new
> server using mod_perl and Apache.  The scripts connect to an Oracle database
> using the Oraperl module wrapper for DBI and DBD::Oracle.
> - Lot's of erroneous stuff deleted ---
> 
> - 
> Ralph Hughes 
> [EMAIL PROTECTED]
> Systems Engineer 334-260-3200
> Anteon Corp.DSN 596-5631
> Montgomery, AL
> 
>  
> 



__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




RE: Strange mod_perl output problem - Followup

2000-05-01 Thread Geoffrey Young



> -Original Message-
> From: Hughes, Ralph [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 01, 2000 9:33 AM
> To: ModPerl
> Subject: Strange mod_perl output problem - Followup
> 
> 
> OK,
> After further investigation, it seems that Oraperl/DBI/DBD, 

eew... Oraperl is way outdated, and basically unsuppored by the community.
Time to move to straight DBI/DBD...

> etc. are not at
> fault!
> I'm formatting the data for display using Perl formats and 
> displaying it as
> pre-formatted output using  tags.  
> This works great for CGI, but mod_perl seems to be having 
> trouble with the
> write() calls to dump the data.

do you have the same problem when moving to print()?  I haven't seen any
code on the list that calls write(), but mod_perl/apache does some tricky
things with tie()ing STDOUT (which is way above me)...

--Geoff

>  Again, there are no errors, 
> but no output
> either.
> Anyone have any experience with this??
>  
> Please CC replies to my email address.   
> Thanks in advance!  
> -
>  
> I have several CGI scripts that I am in the process of moving to a new
> server using mod_perl and Apache.  The scripts connect to an 
> Oracle database
> using the Oraperl module wrapper for DBI and DBD::Oracle.
> - Lot's of erroneous stuff deleted 
> ---
> 
> - 
> Ralph Hughes <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]
> Systems Engineer 334-260-3200
> Anteon Corp.DSN 596-5631
> Montgomery, AL
> 
>  
> 



Strange mod_perl output problem - Followup

2000-05-01 Thread Hughes, Ralph

OK,
After further investigation, it seems that Oraperl/DBI/DBD, etc. are not at
fault!
I'm formatting the data for display using Perl formats and displaying it as
pre-formatted output using  tags.  
This works great for CGI, but mod_perl seems to be having trouble with the
write() calls to dump the data.  Again, there are no errors, but no output
either.
Anyone have any experience with this??
 
Please CC replies to my email address.   
Thanks in advance!  
-
 
I have several CGI scripts that I am in the process of moving to a new
server using mod_perl and Apache.  The scripts connect to an Oracle database
using the Oraperl module wrapper for DBI and DBD::Oracle.
- Lot's of erroneous stuff deleted ---

- 
Ralph Hughes 
[EMAIL PROTECTED]
Systems Engineer 334-260-3200
Anteon Corp.DSN 596-5631
Montgomery, AL