CGI::App to Perl6: A detour, improving CGI.pm for p6

markjugg on 2006-08-26T12:28:58

As I looked in my failing tests for CGI::Application for Perl6, I realized that CGI.pm for Perl6 wasn't as developed as I thought.

It wasn't an OO interface, apparently because it was developed a while ago before that part of pugs was finished. Further, it didn't yet support creating a new object by passing some params to new.

A little bit of hacking later, I fixed and commited both those parts of CGI.pm for Perl6. You can now do this in Perl6:

  use Test;
  plan 1;

use CGI; my $q = CGI.new( rm => 'cgiapp_rocks' ); is($q.param('rm'), 'cgiapp_rocks');
In fact, that looks a lot like one of tests I wrote. ;-).

From there I moved on to providing feedback about the documentation spec for Perl6. Damian Conway responded there, and I look forward to reading the updated spec for that should be available soon.

Until then, back to hacking CGI::Application and Perl6...