On Friday, Sep 12, 2003, at 18:54 US/Pacific, Todd W. wrote: [..]
I dont think you can call that a closure yet. You would have to be defining
subroutines that refer to lexical variables outside of the subroutine or
something along those lines:


[EMAIL PROTECTED] trwww]$ perl
{
    my $dog = 'spot';
    sub dogsName {
      my $pooch = $dog;
      return("my dog is $pooch");
    }
}
[..]

Mea Kulpa! What Was I Thinking? I just did the

perldoc -q closure

but..... hum...

        {
                package Foo::Bar
                use base qw/Foo/;
                ...
        }

Would seem to meet the minimum requirement, since
the 'use base' there deals with the @ISA for that
package name space...

But I think the part that scares me is that

        my $action = {
                doDaemon => sub { ..... },
                ...
        };

would get us into the same 'space'?

I'm not sure I really want to actually create YA_CGI_AppServer,
although, I fear that I am in dire meandering towards that sort
of 'can one create a general enough solution'....

Since, well, uh, one of my doodles is about passing in a
reference to an object, and such things ... Since the basic
'shell' of a CGI script still looks like:

        my $request = $ENV{'REQUEST_METHOD'};
        
        my ($page_type,$page) = ("text/html");
        
        if( defined($request) && $request =~ m/^POST|GET|HEAD$/)
        {
                my $queryString = ($request eq 'POST' )?
                                <STDIN> : $ENV{'QUERY_STRING'};
        
                #
                # a. get the query string into a useable manner
                # b. verify that the query string has what you need
                #               and is safe, sane and sober
                # c. given some key in that query string select the
                #    right method for making a response
                #
        } else {
                #
                # Deal with being passed an unsupported Request Method
                #
        }
        
        make_header_and_send($page_type, $page);

so that of course yearns to be in a module, rather than
as something one would cut and paste into each new CGI script...

But looking at your diagramme, I think I can see why you
are pointing towards a YA_CGI_AppServer....

ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to