Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-21 Thread Ron Savage
On Thu, 2008-02-21 at 09:59 +0800, Silent wrote:

Hi Slient

 has anyone use C-A-Dispatch with FastCGI ?

I had no trouble using it. I can send my code it that helps.
-- 
Ron Savage
[EMAIL PROTECTED]
http://savage.net.au/index.html



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-21 Thread David Steinbrunner
Silent wrote:

 has anyone use C-A-Dispatch with FastCGI ?

snip

 2. after search from google, I tryed:
 
 
 #!/usr/bin/perl
 
 use lib .;
 use CGI::Fast qw(:standard);
 use APP::Dispatch;
 while (my $q = CGI::Fast ) {
 APP::Dispatch-dispatch(
 args_to_new = { QUERY = $q },
   );
 }

Looks comparable to code I have working with the exception of a new on the
CGI::Fast call:

  while ( my $q = CGI::Fast-new ) {

I'm also sending a value in the default param of dispatch.  For you that
value would likely be 'User'.

Beyond those thoughts you might want to look into the debug param and work
with it to see if any light can be shed on things.

--
David Steinbrunner



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] CGI::Application Testing Methodologies

2008-02-21 Thread David Steinbrunner
Jason Purdy wrote:

 My advice would be to factor your code such that the code is separated
 into a testable module.  If your delete_customer function works as
 expected, then all the layers above should work as well since those
 layers are independently tested.

My awareness of testing is that there are two main types, what I'll refer to
as unit testing and functional testing.  Unit testing is what Jason is
talking about above.  Having a strong base on which to build applications on
gives you confidence and is a must if you are serious about automated
testing.  The thing is, if you are dealing with a MVC
(Model-View-Controller) system then you only have your model accounted for
without coverage for the V and C bits.

Functional testing is where you test at the level of what the user interacts
with and deals with test cases your customer could specify.  For instance,
your customer wants to make sure when x is selected y can not also be
selected with out the form returning an error.  Using Test::More and
WWW::Mechanize, maybe a dash of HTML::TreeBuilder, you can automate that
type of test.  Of course, there is a little bit more to it since many
applications these days have lots of JS logic and you application likely
deals with data from a databases that you will want to have be consistent
for your tests but you can handle those for the most part if you get
creative.  It also appears that Selenium is getting a lot of attention by
developers for functional testing but I have yet to use it.  A search on
CPAN shows lots of results for Selenium, too.

In any case, I just wanted to make sure that the idea of testing both from
the bottom and the top in an automated fashion was talked about together.

--
David Steinbrunner



#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####




Re: [cgiapp] how to use C::A::Dispatch with FastCGI ?

2008-02-21 Thread Silent
2008/2/21, David Steinbrunner [EMAIL PROTECTED]:

 Silent wrote:

  has anyone use C-A-Dispatch with FastCGI ?


 snip


  2. after search from google, I tryed:
 
 
  #!/usr/bin/perl
 
  use lib .;
  use CGI::Fast qw(:standard);
  use APP::Dispatch;
  while (my $q = CGI::Fast ) {
  APP::Dispatch-dispatch(
  args_to_new = { QUERY = $q },
);
  }


 Looks comparable to code I have working with the exception of a new on the
 CGI::Fast call:

   while ( my $q = CGI::Fast-new ) {

 I'm also sending a value in the default param of dispatch.  For you that
 value would likely be 'User'.

 Beyond those thoughts you might want to look into the debug param and work
 with it to see if any light can be shed on things.

 --

 David Steinbrunner




OMG, I am so careless,
thanks all !

#  CGI::Application community mailing list  
####
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:  http://cgiapp.erlbaum.net/ ##
####