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 of bloat to the server. and it's oo
> DM> interface, while very slick, adds quite a bit of runtime overhead, turn
> DM> the sugar sour imo.
>
> In an embedded environment like mod_perl, then how do you suggest to
> deal with the dangling file handles problem? That is, I'm processing
> a file or two, and some error occurs. In a normal perl program, I'd
> exit or return out and then when the program terminates, it
> automagically closes all the files. In mod_perl, the auto-close
> doesn't happen until much later. With the OO interface, when the
> handle goes out of scope, such as a function call return, the file is
> implicitly closed.
>
> What other mechanism do you propose to handle this situation other
> than IO::File? I use it all the time myself.
guide... guide... guide... :) (I'll keep you updated with the search
really soon now)
http://perl.apache.org/guide/porting.html#Filehandlers_and_locks_leakages
perl < 5.6
use Symbol;
{
my $fh = gensym;
open $fh, ....
}
perl5.6
{
open my $fh, ...
}
_____________________________________________________________________
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.org http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org