Today's work on porting CGI::Application to Perl6 was special because some of the tests actually began to pass. :) To make this happen, the test scripts themselves have been translated to Perl6. In this case, I also had a dozen test application modules which needed to be converted.
It turned these test modules included fairly simple Perl object syntax, and could largely be converted to Perl6 by running the following find-and-replace functions on them with my editor:
s/use strict;\n/ # use strict is no longer needed! s/^sub /method / # convert subs to methods s/.*my $self = shift;\n// # ...and get rid of this! s/\$self->/self./ # shorten object syntax s/1;// # 1; is gone!
As yesterday, the theme in porting to Perl6 is code removal and simplification. Just by casually browsing the code for refactoring possibilities, I removed an additional 12 lines of code with little effort.
Next I just need to keep working my way through the test suite, continuing to convert the test scripts themselves to Perl6, and see what else needs to change for the tests to pass.
Today's learning experience was that ref
returns more and different values than it used to, and I haven't found good documentation about this yet. So far, I've found that "Pair", "Array" and "Array::Const" are possibilities. So far, I like the simplicity of just HASH and ARRAY from Perl5.
the biggest deficiency of Perl6
markjugg on 2006-08-23T14:33:32
The biggest deficiency I see in Perl6 right now is that CPAN hasn't been ported to Perl6 yet.:)
I expect I'll be preferring Perl5 for production for a long time. One of things I have yet to explore is Perl5 embedding, so Perl5 modules can be used in Perl6.
The definitely seems like a transitional solution, though, due to the extra overhead and complexity of it.