Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Monday December 29, 2008
05:02 AM

Perl 6 Hangman

[ #38174 ]

Aside from going north and spending time with family in Stoke-On-Trent, I also spent time working with Perl 6. I started by writing a "hangman" program in Perl 5. At first I thought it would be too simple, but in porting it to Perl 6 it turned out to have just the right mix of a number of important features. I needed I/O to read a wordlist, regexes to match letters and a simple class to encapsulate everything. I also submitted three bug reports and a medium size doc path. All things considered, not too bad given that I spent most of my time with family.

Speaking of bug reports, this was a tough one to debug in r34446:

class Foo {
    has @something is rw;

    method doit {
        @something = <1 2 3>;
        say self!something;

    my method something () {
        return "Hello, World!";
my Foo $foo .= new;

That prints '123'. Comment out the @something lines and it prints "Hello, World!" as expected.

Despite minor hitches, I was very pleased with how far Perl 6 is coming along. When I get something working, I'll post it.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.