Stas Bekman wrote: > Stas Bekman wrote: > >> Geoff, >> >> APR::Finfo::stat() doesn't do what C API does. The C API populates >> finfo for the file passed in the argument. The current perl API >> doesn't do that. It populates only $r->finfo, passed as an argument, >> which may not exist at all.
I really don't understand what you mean here. APR::Finfo::stat() is autogenerated, so it behaves _exactly_ as the C API does. > + my $finfo = APR::Finfo::stat($file, APR::FINFO_NORM, $r->pool); the C apr_stat() function takes an apr_finfo_t structure as the first argument. where are you getting your apr_finfo_t from? wherever it is that you are doing it, as I see it you are creating one of two problems. - if you're using r->finfo() then you're presupposing a request_rec in an APR routine, as well as limiting any other use of apr_stat() that doesn't involve r->finfo. - if you are creating your own apr_finfo_t, then how does one populate r->finfo? you absolutely need a way to do that otherwise you can never update the data that apache uses to make certain decisions, which is the entire point of populating r->finfo via $r->finfo. > - my $status = $r->finfo->stat($file, APR::FINFO_NORM, $r->pool); so, this looks just fine to me. I suppose if you want to stat another file you need to figure out a way to generate an apr_finfo_t structure on your own, as there currently isn't any method I can see that returns an apr_finfo_t other than $r->finfo(). but that doesn't mean we shouldn't add one :) --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]