Geoffrey Young wrote:
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.

What you are missing is that a user is passing that data using the 'cmd_data' hash key, so trying to retrieve it with info() is not the best choice of the interface, IMHO. I think the key and the retrieving function need to match. If you want it to be 'info', then it should be 'info' in both places.



-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to