You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Joel W. Reed" <jr...@support.ddiworld.com> on 2001/02/15 14:30:16 UTC

Apache::ASP - AS PerlScript compatibility request

to be more fully compliant with ActiveState's PerlScript
we need the following methods on Apache::ASP::Collection
object.

sub Count <-- # of keys in $Request->QueryString or $Request->Form

sub Key {
	my ($self, $keynum) = @_;
}

attached are two test files & sample output under windows.

jr

-- 
------------------------------------------------------------------------
Joel W. Reed                                                412-257-3881
--------------All the simple programs have been written.----------------



Re: Apache::ASP - AS PerlScript compatibility request

Posted by Joshua Chamas <jo...@chamas.com>.
"Joel W. Reed" wrote:
> 
> On Feb 15, jreed@support.ddiworld.com contorted a few electrons to say...
> modperl> to be more fully compliant with ActiveState's PerlScript
> modperl> we need the following methods on Apache::ASP::Collection
> modperl> object.
> modperl>
> modperl> sub Count <-- # of keys in $Request->QueryString or $Request->Form
> modperl>
> modperl> sub Key {
> modperl>        my ($self, $keynum) = @_;
> modperl> }

I'll be happy to roll this functionality into 2.11 release
for Apache::ASP.  If you'd like an early test version, please
let me know.

-- Josh

_________________________________________________________________
Joshua Chamas			        Chamas Enterprises Inc.
NodeWorks >> free web link monitoring	Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

Re: Apache::ASP - AS PerlScript compatibility request

Posted by "Joel W. Reed" <jr...@support.ddiworld.com>.
On Feb 15, jreed@support.ddiworld.com contorted a few electrons to say...
modperl> to be more fully compliant with ActiveState's PerlScript
modperl> we need the following methods on Apache::ASP::Collection
modperl> object.
modperl> 
modperl> sub Count <-- # of keys in $Request->QueryString or $Request->Form
modperl> 
modperl> sub Key {
modperl> 	my ($self, $keynum) = @_;
modperl> }

and here is the code that implements this functionality.

--- ASP.pm	Tue Jan 30 22:35:37 2001
+++ /usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm	Thu Feb 15 12:55:11 2001
@@ -5253,6 +5253,17 @@ sub Contents { 
     }
 }
 
+sub Count {
+    my ($self) = @_;
+    return scalar (keys %{$self});
+}
+
+sub Key {
+  my ($self, $indx) = @_;
+  my @keys = keys %{$self};
+  return $keys[$indx-1];
+}
+
 sub Item {
     my($self, $key, $value) = @_;
     my @rv;


-- 
------------------------------------------------------------------------
Joel W. Reed                                                412-257-3881
--------------All the simple programs have been written.----------------