package Foo;
 $Response->Write("Hello World"); # wrong...

I looked in ASP.pm and they did something similiar to

 package Foo;
 use vars qw($Response);
 $Response = $main::Response;
 $Response->Write("hello world");

If I don't want to override anything then shouldn't I make $Foo::Response
and alias to $main::Response and not just a copy of it? Something like

 package Foo;
 use vars qw($Response);
 local(*Response) = *main;     # ??? this is wrong
 *Response = \$main::Response; # so is this

I know this was talking about on the list a long long time ago ( perhaps
under the old mailing list software ) but a search for '$Response modules
alias' on both activestate.com and google.com turned up nothing. I flipped
through Advanced Perl Programming Chapter 3: Typeglobs and Symbol Tables but
could find exactly what I wanted to do. I think Conway talks about this in
his Object book ( more indepth discussion of symboltables ) but I don't have
that with me.

I did stumble across a very interesting comparison between 27 different
languages:

 http://www.bagley.org/~doug/shootout/

It was nice to see well written Perl code being compared to other languages.

- Ron

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to