I am trying to roll my own parameter collection routines...

I am trying this:

        #Parse / Collect the parameters.
        my %params;
        foreach ($apr->param)
        {
                if (ref($apr->param($_)) eq "ARRAY")


                        $params{$_} = [$apr->param($_)];
                }
                else
                {
                        $params{$_} = $apr->param($_);
                }
        }

the ref always seems to come out UNDEF but if I take out that logic and
just use

$params($_) = [$apr->param($_)];

Then it is a ref and can be used in a

foreach (@{$params($key)}) { }

as expected.

Any ideas where my understanding is going wrong?

Confused,

Wes

Reply via email to