Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: updating r->finfo on $r->filename($newfile): msg#00366

apache.mod-perl.devel

Subject: Re: updating r->finfo on $r->filename($newfile)

Geoffrey Young wrote:

anyway, I can't bring myself to belive that we can map the request_rec to a class but we can't map apr_finfo_t. maybe it's my naivete speaking, though :)



I believe you are trying to compare beer with cranberry juice. request_rec is not used by perl, whereas perl wants finfo as returned by stat to work with.

so, I'll give it a whirl and see what I an do.



May I suggest that we discuss first what is to be done? Philippe has already spent a lot of time trying to do that...


hmm. maybe I'm just not understanding stuff.

I can see where it would be hard to make this work

my $size = -s $r->finfo

like it did in 1.0. but I don't see how this would be too hard

my $size = $r->finfo->csize

while it's not as nifty as 1.0, and it wouldn't have the cached _ filehandle, it seems that using apache's cached stat information would still be more efficient that a full call to -s $r->filename.

Of course. I didn't say not. You just won't be able to use perl's API for that, but instead using APR API, so instead of saying:

-r $r->finfo && -w _ ;

users will have to say:

$r->finfo->perms eq 'r' && $r->finfo->perms eq 'w'

or whatever the accessor API is (will be). The stat struct is cached but on the apache side.

or are we just not taking about the same thing here?

Yup, we are talking about the same thing. I just thought that you said you will try to provide the mapping (i.e. provide a function which will convert apr_finfo_t to finfo).

Before putting much thought to it, since we are so eager to provide 1:1 mapping of the C API, we should just provide the perl glue to the functions in the APR API plus accessors to those elements that have no functions.


I don't understand this. do you mean complete missing parts of APR::? I haven't looked at APR too closely, but yeah, if there are missing parts that would be a good thing to do :)

Neither I have looked, I hoped that finfo will somehow magically work in the future ;)

I guess I'm having a fairly unclear day :)

foggy ;)

I can see both sides. given the current options, I think IO makes more sense than the others, but I really don't care. or if you think a new designation is deserved that's fine too, though I don't know what else would go there.



what it really does, is manipulating an internal Apache struct, hence I suggested to have a tracing option which will show only traces that affect Apache internal structs. e.g. tracing the mod of document_root sounds like a good example which will fit the MP_TRACE_a category


ok, MP_TRACE_a it is, then.

actually, I kind of like it - if we use it for places where we add logic behind what would otherwise be raw ap* calls, that would be very nice to have.

cool.

cool++


--


__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
version-control...    qnx.openqnx.dev...    redhat.rhn.user...    ietf.openpgp/20...    mail.mutt.user/...    web.microformat...    java.sync4j.use...    education.ezpro...    user-groups.blu...    solaris.manager...    org.fitug.debat...    technology.erps...    politics.activi...    linux.redhat.fe...    bug-tracking.ma...    xfce.user/2004-...    hams/2004-11/ms...    kde.users.pim/2...    culture.cooking...    freebsd.devel.x...    gnu.m4.adhoc/20...    ngpt.user/2002-...    apple.fink.deve...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation