perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: [mp2] Suggest renaming Apache::CmdParms $parms->info to $parms->cmd_data
Date Mon, 13 Sep 2004 22:53:43 GMT


Stas Bekman wrote:
> Philippe M. Chiasson wrote:
> 
>> From this example :
>>
>>  our @APACHE_MODULE_COMMANDS = (
>>    {
>>      name => 'MyDirective1',
>>      func => \&MyDirective,
>>      cmd_data => 'One',
>>    },
>>    {
>>      name => 'MyDirective2',
>>      func => \&MyDirective,
>>      cmd_data => 'Two',
>>    },
>>  );
>>
>>  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.

Yeah, with a bit more magic on top of it, since parms->info->cmd_data is _really_
a void *.

> 

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message