George,

I started to critique this, but ran into several questions. Could you
additionally post the "plain English" version of what this supposed to
do? (and consider including the less clear parts of that directly in
code documentation). 

Thanks,

  -mark 

George Jempty wrote:
> 
> First off, thanks to everybody who has helped me on
> this group thus far.  I'm lacking in both experience,
> but especially resources, so am trying to sell
> management on the use of CGI::Application, if only for
> the informal support available here.
> 
> I'd like feedback on my setup method.  At present it
> looks like:
> 
> #
> sub setup
>   {
>   my $self = shift;
>   my $cgi = $self->query();
> 
>   my @crudButtons = qw(create read update delete);
>   my $defaultMode = 'create';
> 
>   my $crudMode = GetSubmitName(\@crudButtons,
> $cgi->Vars) || $defaultMode;
>   my $crudCall = sub {return $crudMode};
> 
>   my $selfState = AutoStatus();
> 
>   $self->mode_param($crudCall);
> 
>   $self->param('cgi' => $cgi);
>   $self->param('crud_buttons' => \@crudButtons);
>   $self->param('crud_mode' => $crudMode);
>   $self->param('state' => $selfState);
> 
>   foreach my $button (@crudButtons)
>     {
>     $self->run_modes($button  => \&$button);
>     }
>   }
> #
> 
> Is there anything I can do more efficiently, both from
> a general Perl and a specific CGI::Application
> perspective?  For instance, should @crudButtons be
> replaced by a (scalar) reference to an anonymous list?
>  And/or, will it save overhead to pass the $cgi
> reference to $self->query() as a param to be used by
> the run modes?
> 
> Etcetera.  Thanks in advance.  Eventually I may
> migrate some of the above to cgiapp_init, and perhaps
> in the long term work on something I might call
> CGI::Application::CRUD, where CRUD is not only a
> meaningful acronym, but also a way of managing
> expectations ;)
> 
> =====
> George M. Jempty
> Database Admin/Intranet Architect
> Regional West Medical Center
> Scottsbluff, Nebraska
> [EMAIL PROTECTED][EMAIL PROTECTED]
> 
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--

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

Reply via email to