Improving CGI.pm for Perl 6
This is one of a few Perl 6 posts I'm bringing over from my use.perl journal. I'll eventually post Perl 6 writing directly here.
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...

Comments