I'm implementing PerlIO::APR (will be APR::IO in mod_perl) I need to get my hands on the memory pool. Currently I use the global pool via modperl_global_get_pconf(). which allows you to keep your code as a pure perl:
open my $fh, ">:APR", $path or die "$!"; Does calling modperl_global_get_pconf() make things slower? If it does, where do we stick $r/$s? something like this? ($r||$s)->file_open(my $fh, ">", $path) or die $!;? or may be we can keep the perl syntax and use the server pool? which can be fetched only once and stored in a static variable? In fact we can do the same with modperl_global_get_pconf(), but I think there is a problem if we don't use $r's pool -- the memory allocated during file ops won't be cleaned at the end of request :( but I really want to keep the perl syntax, so how about this: open my $fh, ">:APR", $r, $path or die "$!"; or: open my $fh, ">:APR", $path, $r or die "$!"; s/$r/$s/ will work too. _____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]