perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <>
Subject Re: modperl_env.c [was tie $r STDOUT]
Date Fri, 14 Jul 2006 09:28:47 GMT
So I've noticed some other "issues" that I can cause
  local %ENV {FOO => 1}
(see t/response/TestModperl/

which ends up in modperl_env.c:
static void modperl_env_table_unpopulate(pTHX_ apr_table_t *table)
    HV *hv = ENVHV;
    U32 mg_flags;
    int i;
    const apr_array_header_t *array;
    apr_table_entry_t *elts;


by adding the 2 sv_dumps above, I would expect the second one to tell
me that hv (ENVHV) is no longer tied via 'E', but it _is_.  I'm probably missing
something, but I've no idea what ?

Also, when the time comes to call
modperl_env_hv_delete() a few lines farther down

void modperl_env_hv_delete(pTHX_ HV *hv, char *key)
    I32 klen = strlen(key);

    if (hv_exists(hv, key, klen)) {
        hv_delete(hv, key, strlen(key), G_DISCARD);

This if is _NEVER_ true for the key 'FOO'

So I tried commenting out the if() just to see what what happen an nothing happened.
The hash key element never has un_magic(sv, 'e') to undo modperl_envelem_tie()...
I tried un_magic'ing the 'key' itself before trying to delete it from the hash 'hv'
and that didn't accomplish anything either.


Philip M. Gollucci ( 323.219.4708
Consultant /
Senior Software Engineer - TicketMaster -
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message