August 2008

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Recently on this blog
Recently on other blogs

Map

Audrey

My Photo

License

« Improved Perl6 Documentation available | Main | CGI::App to Perl 6: Reference handling not needed here »

2006.09.02

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

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment