Re: Apache::File correction

2002-04-13 Thread Dominic Mitchell
Rob Nagler <[EMAIL PROTECTED]> writes: > > undef $/; # enable "slurp" mode > > I think the "local" is pretty important, especially in mod_perl: > > local $/; > > This has the same effect (the "undef" is unnecessary). It's also a > good idea to enclose the code in a subroutin

Re: Apache::File correction

2002-04-12 Thread Rob Nagler
> undef $/; # enable "slurp" mode I think the "local" is pretty important, especially in mod_perl: local $/; This has the same effect (the "undef" is unnecessary). It's also a good idea to enclose the code in a subroutine with error checking: sub read_file { my($

Re: Apache::File correction

2002-04-12 Thread Ernest Lergon
Martin Haase-Thomas wrote: > > [snip] Secondly I wonder whether "local $/ = undef" > will have any effect. But I've never tried overriding Perl's predefined > variables. > > regards Dear Martin, this is the well-known file-slurp mode. E.g.: undef $/; # enable "slurp" mode $

Re: Apache::File correction

2002-04-10 Thread Martin Haase-Thomas
ng Perl's predefined variables. regards Martin Rasoul Hajikhani wrote: >Folks, >The Apache::File man pages indicate that > >($name,$fh) = Apache::File->tmpfile; > >returns a fh ready to write to. So far so good. > >In case of wanting to read from it, here is wha

Re: Apache::File correction

2002-04-10 Thread Rasoul Hajikhani
Robert Landrum wrote: > > At 1:44 PM -0700 4/10/02, Rasoul Hajikhani wrote: > >Folks, > >The Apache::File man pages indicate that > > > >($name,$fh) = Apache::File->tmpfile; > > > >returns a fh ready to write to. So far so good. > > >

Re: Apache::File correction

2002-04-10 Thread Robert Landrum
At 1:44 PM -0700 4/10/02, Rasoul Hajikhani wrote: >Folks, >The Apache::File man pages indicate that > >($name,$fh) = Apache::File->tmpfile; > >returns a fh ready to write to. So far so good. > >In case of wanting to read from it, here is what I do: > ># Is thi

Apache::File correction

2002-04-10 Thread Rasoul Hajikhani
Folks, The Apache::File man pages indicate that ($name,$fh) = Apache::File->tmpfile; returns a fh ready to write to. So far so good. In case of wanting to read from it, here is what I do: # Is this necessary? $fh->close() or die "Could not close $name: $!\n"; $fh->op

Apache::File

2002-04-10 Thread Rasoul Hajikhani
Folks, The Apache::File man pages indicate that ($name,$fh) = Apache::File->tmpfile; returns a fh ready to write to. So far so good. In case of wanting to read from it, here is what I do: # Is this necessary? $fh->close() or die "Could not close $name: $!\n"; $opfh->op

Re: [Q] Apache::File->new

2002-02-12 Thread Martin Haase-Thomas
=~ s/.jsp$/_jsp/;     $fname =~ s:/jsp/:/html/:;     $fname .= $catid;     $fname .= ".html" unless $fname =~ /\.html$/; $r->log()->debug($fname."\n".$r->filename);     $fh = Apache::File->new($fname) || return DECLINED;     $r->header_out('Content-Length', -s $fn

Re: [Q] Apache::File->new

2002-02-12 Thread Geoffrey Young
Martin Haase-Thomas wrote: > > Hi, > I searched in the book, I searched in the FAQs - no I ask u: > > Does Apache::File->new start a subrequest? no. it is merely a layer over Perl's file IO methods (Perl_do_open from what I can see). > There are some mystical

[Q] Apache::File->new

2002-02-12 Thread Martin Haase-Thomas
Hi, I searched in the book, I searched in the FAQs - no I ask u: Does Apache::File->new start a subrequest? There are some mystical lines in my rewrite_log, which might come from there. Thanx a lot Martin

RE: Can't Locate Apache::File

2000-08-29 Thread Geoffrey Young
did you build mod_perl with EVERYTHING=1 or PERL_FILE_API=1? HTH --Geoff > -Original Message- > From: David E. Wheeler [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 29, 2000 1:56 PM > To: [EMAIL PROTECTED] > Subject: Can't Locate Apache::File > >

Can't Locate Apache::File

2000-08-29 Thread David E. Wheeler
Hi All, I've just installed the latest version of Lincoln Stein's Apache::MP3 (nice job, Doc!), which offers support for caching MP3 ICY info. It uses Apache::File to do so. This the first time I've used Apache::File on this server, but was still surprised to find that it failed

Re: passing Apache::File to XS code that expects FILE *?

2000-05-19 Thread Doug MacEachern
On Thu, 18 May 2000, Vivek Khera wrote: > > "DM" == Doug MacEachern <[EMAIL PROTECTED]> writes: > > DM> On Wed, 17 May 2000, Matt Sergeant wrote: > >> Well, this may be true, but if you load IO::File before startup then it's > >> not too big a deal... > > DM> but it still adds a great deal

Re: passing Apache::File to XS code that expects FILE *?

2000-05-18 Thread Stas Bekman
On Thu, 18 May 2000, Vivek Khera wrote: > > "DM" == Doug MacEachern <[EMAIL PROTECTED]> writes: > > DM> On Wed, 17 May 2000, Matt Sergeant wrote: > >> Well, this may be true, but if you load IO::File before startup then it's > >> not too big a deal... > > DM> but it still adds a great deal

Re: passing Apache::File to XS code that expects FILE *?

2000-05-18 Thread Matt Sergeant
On Thu, 18 May 2000, Vivek Khera wrote: > > "DM" == Doug MacEachern <[EMAIL PROTECTED]> writes: > > DM> On Wed, 17 May 2000, Matt Sergeant wrote: > >> Well, this may be true, but if you load IO::File before startup then it's > >> not too big a deal... > > DM> but it still adds a great deal

Re: passing Apache::File to XS code that expects FILE *?

2000-05-18 Thread Vivek Khera
> "DM" == Doug MacEachern <[EMAIL PROTECTED]> writes: DM> On Wed, 17 May 2000, Matt Sergeant wrote: >> Well, this may be true, but if you load IO::File before startup then it's >> not too big a deal... DM> but it still adds a great deal of bloat to the server. and it's oo DM> interface, whi

Re: passing Apache::File to XS code that expects FILE *?

2000-05-17 Thread Doug MacEachern
On Wed, 17 May 2000, Matt Sergeant wrote: > Well, this may be true, but if you load IO::File before startup then it's > not too big a deal... but it still adds a great deal of bloat to the server. and it's oo interface, while very slick, adds quite a bit of runtime overhead, turn the sugar sou

Re: passing Apache::File to XS code that expects FILE *?

2000-05-17 Thread Doug MacEachern
On Wed, 17 May 2000, Jim Winstead wrote: > Is there some trick to passing an Apache::File to a function from > an XS module that expects a FILE *? so long as the xsub uses a FILE *, the typemap will take care of the magic. for example, Apache::send_fd() is an xsub that uses the FILE * t

Re: passing Apache::File to XS code that expects FILE *?

2000-05-17 Thread Matt Sergeant
On Wed, 17 May 2000, Jim Winstead wrote: > On May 17, Matt Sergeant wrote: > > Or IO::File->new_tmpfile(); > > I'd rather not go there. > > http://marc.theaimsgroup.com/?l=apache-modperl&m=95454378223412&w=2 Well, this may be true, but if you load IO::File before startup then it's not too big

Re: passing Apache::File to XS code that expects FILE *?

2000-05-17 Thread Jim Winstead
On May 17, Matt Sergeant wrote: > Or IO::File->new_tmpfile(); I'd rather not go there. http://marc.theaimsgroup.com/?l=apache-modperl&m=95454378223412&w=2 Jim

Re: passing Apache::File to XS code that expects FILE *?

2000-05-17 Thread Matt Sergeant
On Wed, 17 May 2000, Jim Winstead wrote: > Is there some trick to passing an Apache::File to a function from > an XS module that expects a FILE *? > > There's too much perl magic going on in the Apache::File implementation > for me to see where I can just pull the FILE

passing Apache::File to XS code that expects FILE *?

2000-05-17 Thread Jim Winstead
Is there some trick to passing an Apache::File to a function from an XS module that expects a FILE *? There's too much perl magic going on in the Apache::File implementation for me to see where I can just pull the FILE * out. (Its not strictly necessary that I do this, of course, it would

Apache::File wierdness

2000-02-08 Thread Reza Naima
I'm getting a very irritating problem. I upgraded apache/mod_perl recently : Apache/1.3.11 (Unix) PHP/3.0.14 mod_fastcgi/2.2.2 mod_perl/1.21 and I'm getting an irritating error now with my mod_perl code that uses Apache::File.. Can't locate loadable object for module Apach

strange: pdf page is loaded twice with Apache::File

1999-11-22 Thread Dirk Lutzebaeck
Hi, I have a strange problem with Apache::File : everytime a PDF is loaded (ie. a plugin is started in the browser) I see two requests for the same file. This happens with no other file types and not with direct pdf downloads. What I don't understand is why NS or MSIE send Pragma: no-