in reply to Re^3: Checkbox parameter not being stored in CGI::Session
in thread Checkbox parameter not being stored in CGI::Session

ok. this design above i got to decipher now. it looks semantically really nice. thanks.
  • Comment on Re^4: Checkbox parameter not being stored in CGI::Session

Replies are listed 'Best First'.
Re^5: Checkbox parameter not being stored in CGI::Session
by Anonymous Monk on Oct 13, 2014 at 10:44 UTC

    ok. this design above i got to decipher now. it looks semantically really nice. thanks.

    :) hmm, an offline dev env/test/decipher tool

    #!/usr/bin/perl -- ## collect.t ## ## #!/usr/bin/perl -- use strict; use warnings; use TestCGIApplication; use Test::More qw/ no_plan /; ## ok/like ... my $out = collectQuery( qw/ / ); like( $out, qr/welcome/, "empty page is welcoming " ); $out = collectQuery( qw/ t1 t1 t2 t2 cbox oncbox / ); like( $out, qr/invalid/, "invalid input @args" ); $out = collectQuery( valid => qw/ t1 t1 t2 t2 cbox off / ); like( $out, qr/Location/, "they're valid and i'm redirected" ); # ... more tests here?? Test::More::done_testing(); exit( 0 ); sub collectQuery { my $app = TestCGIApplication->new; $app->query( CGI->new( { @_ } ) );; return $app->collectPage; } sub TestCGIApplication::collectPage { ... }

    When you've got TestCGIApplication::collectPage and helpers working, you move it into TestCGIApplication.pm , , and start a new test file

    Some tips Re: loop exits after printing the file, zentara package/module tutorial )

      the test app was just a mock thing...
      my real application is way more complicated than that. im glad u pulled it up ,else i would not have been able to complete it , most venerable Monk.
      i will have to get in Test::More too ..but maybe later.