|
|
Choosing A Webhost: |
Re: [mp2] APR::Finfo::stat needs rework: msg#00137apache.mod-perl.devel
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: license update for mp2 api docs?, Stas Bekman |
|---|---|
| Next by Date: | Re: [mp2] APR::Finfo::stat needs rework, Geoffrey Young |
| Previous by Thread: | Re: [mp2] APR::Finfo::stat needs rework, Stas Bekman |
| Next by Thread: | Re: [mp2] APR::Finfo::stat needs rework, Geoffrey Young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |