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
> 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($
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
$
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
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.
> >
>
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
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
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
=~ 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
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
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
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
>
>
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
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
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
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
> "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
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
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
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
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
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
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
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
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-
25 matches
Mail list logo