perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: [mp2] Suggest renaming Apache::CmdParms $parms->info to $parms->cmd_data
Date Thu, 16 Sep 2004 02:10:52 GMT

>>>  sub MyDirective {
>>>    my($self, $parms, $args) = @_;
>>>    my $info = $parms->info;
>>>                       ^^^^
>>>
>>> Wouldn't $parms->cmd_data make more sense ?

>> +1
>>
>> Especially since parms->info on the C level is something else. It's
>> really parms->info->cmd_data.

while our code interface into it is parms->info->cmd_data that's not the way
a C programmer would use it.  over in C land the directive handler interface
looks exactly like the current perl interface.  for instance, from core.c:

static const char *set_server_string_slot(cmd_parms *cmd, void *dummy,
                                          const char *arg)
{
    /* This one's pretty generic... */


    int offset = (int)(long)cmd->info;

so, unless I'm missing something, I don't see the reason to change this
interface at all.

--Geoff



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message