$Request->QueryString->('foo')->Item() isn't valid perl syntax,
is it? Are you going for $Request->QueryString('foo')->Item()
support here?
There is already a Collection class that is used to emulate
this kind of behavior, which can possibly be extended to
meet this need. One of the behaviors that this interface
supports is:
$Request->QueryString->Item('foo')
Do you really need the above interface? If so, I'll need
to create a config setting I imagine as there will be
a significant performance impact do doing something
like you suggest.
--Joshua
"joel w. reed" wrote:
>
> I'm trying to write an ASP app that runs under PerlScript and Apache::ASP.
>
> i've found that with ActivePerl 618 -- $Request->QueryString->('foo')
> return a reference to a Win32::OLE hash.
>
> to get a string from the hash you must write --
> $Request->QueryString->('foo')->Item()
> or you must use one of the hacks in the OLE.pm docs that come with ActivePerl.
>
> $Request->QueryString->('foo')->Item() however doesn't work
> under Apache::ASP. so i'm wondering if something like the patch
> below would improve compatibility without hurting performance
> too much.
>
> comments? suggestions? i know the patch below would need work
> to support the "array of values" ASP thing...
>
> --- /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm Tue Aug 1 19:42:18 2000
> +++ /home/jreed/tmp/ASP.pm Mon Oct 9 16:30:21 2000
> @@ -2640,6 +2640,25 @@ sub ScriptOnFlush {
>
> 1;
>
> +package Apache::ASP::QsObj;
> +
> +sub new {
> + my $class = shift;
> + my $self = {};
> + $self->{str} = shift;
> +
> + bless $self, $class;
> + return $self;
> + };
> +
> +sub Item()
> + {
> + my $self = shift;
> + return $self->{str};
> + }
> +
> +1;
> +
> # Request Object
> package Apache::ASP::Request;
>
> @@ -2794,7 +2813,11 @@ sub Form
> sub FileUpload
> { shift->{FileUpload}->Item(@_) }
> sub QueryString
> - { shift->{QueryString}->Item(@_) }
> + {
> + my $self = shift;
> + my $key = shift;
> + return new Apache::ASP::QsObj($self->{QueryString}->Item($key));
> + }
> sub ServerVariables
> { shift->{ServerVariables}->Item(@_) }
>
>
> --
> ------------------------------------------------------------------------
> Joel W. Reed 412-257-3881
> --------------All the simple programs have been written.----------------
>
>
>------------------------------------------------------------------------------------------------------------------------------------------------------
> Part 1.2Type: application/pgp-signature