Michael wrote:
> Paul Makepeace wrote:
> 
>> Hi,
>>
>>   sub params {
>>       my ($self, $request, $params) = @_;
>>       $params ||= { };
>>         my $plist = $self->{ SERVICE_PARAMS };
>>       my $all = $plist->{ all };
>>         return $params unless keys %$plist;
>>       $request = Apache::Request->new($request);
>>                ^
>>
>> Is this intentional (Andy)? Was ||= in mind, like for $params?
> 
> 
> I think he was trying to make sure that the $request was an
> Apache::Request object an not just the Apache->request. They are
> different. Creating a new Apache::Request off another Apache::Request
> shouldn't be a problem.

right.

> 
> If it really concerns you then maybe a
>     $request = Apache::Request->new($request)
>         if(! request || (ref $request eq 'Apache'));

that won't work (in all cases) because of later code:

    $params->{ params } = { %{ $request->parms() } }
        if $all or $plist->{ params };

params() is an Apache::Request method, not an Apache method.

HTH

--Geoff

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to