|
|
Choosing A Webhost: |
Re: $parms->info(), take 2: msg#00343apache.mod-perl.devel
Geoffrey Young wrote:
Even though they look random, they aren't. I have tried to document some of these here: http://perl.apache.org/docs/2.0/devel/core/explained.html#Adding_Wrappers_for_existing_APIs_and_Creating_New_APIs Admittedly it's incomplete. I wrote that document when I was coping with this puzzle myself. As you are now coping with it, it'd help if you could improve that document. I believe Doug's idea was to have to write (and maintain) the minimal amount of code. So if you have a simple function where the args and return values can be converted from perl to C and back automatically, you use just that. If you have an optional number of args you use (...) and manipulate the stack. If you have a variable number/type of return args you use XS(). If you read the above section, things might get more clear. The ways you coded the function the first and second time weren't wrong, they were just unnecessary verbose. All we want is to keep the code as simple as possible, which simplifies the maintence and reduces the number of potential bugs. Hope this "noble" goal is understandable. __________________________________________________________________ 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> |
|---|---|---|
| Previous by Date: | Re: $parms->info(), take 2, Geoffrey Young |
|---|---|
| Next by Date: | mp2.0 - make test failed compat/apache_util.t, Batara Kesuma |
| Previous by Thread: | Re: $parms->info(), take 2, Geoffrey Young |
| Next by Thread: | Re: $parms->info(), take 2, 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 |