[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] RE: :App, CGI::Session and CGI::Simple


That kind of solution is the ideal Perl5 solution. You're not just
testing for an expressed interface, but you instead are testing for
expressed functionality, which is what you want to test for in the first
place.

As for how to build that function ... it would probably be best, for a
first approximation, to mine the test files in the CGI distribution.

Where would this function live? I can see this being a good module,
maybe CGI::TestConformity?

-----Original Message-----
From: Mark Stosberg [mailto:suppressed 
Sent: Wednesday, April 28, 2004 4:18 PM
To: suppressed
Subject: Re: :App, CGI::Session and CGI::Simple

On 2004-04-28, Ron Savage <suppressed> wrote:
> On Tue, 27 Apr 2004 07:54:50 -0400, Kinyon, Rob wrote:
>
> Hi Rob
>
>> 1) You will want to do that kind of checking when you are handed the
>> object in your constructor. So, you'll have to compile a list of
>> methods
>> the object will need to handle. Now, this is a good thing, from a
>> documentation standpoint, but it's not what you suggested.
>
> Yep. Cees suggested CGI provide a list of methods. I emailed Lincoln 
> Stein about this yesterday, but so far no response.

As a shorter term solution, would about having a function like:

test_for_CGI_compatibility()

In it, do something basic with 'param' and 'cookie'. Then,
just eval the executation of this test to see if it dies, or returns a
reasonable result. 

Other modules that need to test for CGI.pm-ness would find this useful
as well. (Data::FormValidator is one). 

	Mark

--
 . . . . . . . . . . . . . . . . . . . . . . . . . . . 
   Mark Stosberg            Principal Developer  
   suppressed     Summersault, LLC     
   765-939-9301 ext 202     database driven websites
 . . . . . http://www.summersault.com/ . . . . . . . .


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.