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.

+ -

  Comment: Nifty! (Score 1) on 2010.08.30 2:47

by Ovid on 2010.08.30 2:47 (#72359)
Attached to: Idiomatic Perl 6

I really like this. I liked it even more as I worked through all of the examples to better understand them. One thing I would change:

say $_.perl for @pascal;

The output is much clearer that way (at least to me). I actually tried to get it a touch more "triangly":

my @pascal := do [1], -> @p { [0,@p Z+ @p,0] } ... *;
say ' ' x 2 * (10 - $_.elems), $_.perl for @pascal[^10];

But wound up with this:

                [1, 1]
              [1, 2, 1]
            [1, 3, 3, 1]
          [1, 4, 6, 4, 1]
        [1, 5, 10, 10, 5, 1]
      [1, 6, 15, 20, 15, 6, 1]
    [1, 7, 21, 35, 35, 21, 7, 1]
  [1, 8, 28, 56, 70, 56, 28, 8, 1]
[1, 9, 36, 84, 126, 126, 84, 36, 9, 1]

Ah well :)

Read More 9 comments
Comments: 9
+ -

  Comment: Congrats :) (Score 1) on 2010.08.20 20:40

by Ovid on 2010.08.20 20:40 (#72335)
Attached to: Flore Louise Apolline Bruhat-Souche
Lovely girl :)
Read More 3 comments
Comments: 3
+ -

  Comment: Re:install_test (Score 1) on 2010.08.11 2:40

by Ovid on 2010.08.11 2:40 (#72282)
Attached to: Test::Builder2::Design

I would love to install a module and then rerun all of my currently installed module's tests, so yes :)

Read More 3 comments
Comments: 3
+ -

  Comment: install_test (Score 1) on 2010.08.10 0:55

by Ovid on 2010.08.10 0:55 (#72271)
Attached to: Test::Builder2::Design

At first, I was sooooo happy to see install_test, only to realise that this is TB2, not EMM, and you weren't referring to installing tests.

Read More 3 comments
Comments: 3
+ -

  Comment: Re:Moose Notes (Score 1) on 2010.08.03 2:53

by Ovid on 2010.08.03 2:53 (#72228)
Attached to: Protesting the Moose with sugary alternatives

Eek, Perl's built-ins behave differently depending on whether or not you call them in scalar context? Yet another reason to be annoyed! ;)

Seriously, it will take you about 3 seconds to get used to this behaviour of the with function and it's behaviour you want.

If you must write an alternative to the Moose API, I strongly recommend that you use Moose for a few months to get really comfortable with it and make sure you understand the design implications. Moose is great and well worth the learning curve. Just make sure that if you provide an alternate API that you understand why decisions have been made the way that they have. Breaking the rules is far more likely to be successful if you know why you're breaking them :)

Read More 17 comments
Comments: 17
+ -

  Comment: Moose Notes (Score 1) on 2010.08.03 2:15

by Ovid on 2010.08.03 2:15 (#72226)
Attached to: Protesting the Moose with sugary alternatives

I wasn't aware that the extends needs to be in a BEGIN block unless you really do have code which needs to happen at BEGIN time. Am I wrong? (Could be).

Also, with accepts a list and using multiple with statements should be avoided unless you have a very, very good reason to do so. A single with statement is like this:

with qw(Does::Role1 DoesRole2);

Using it like that gets you the method conflict resolution. Using separate with statements is not only overly verbose, but it composes each role in separately. Since a role method is silently discarded if the class provides a method of the same name, if Does::Role1 provides a munge method and Does::Role2 also tries to provide it, you will never get Does::Role2's method composed in if you use with separately, but you will get a proper conflict when you use them at the same time.

Also, if you want to provide a default is for the has, make it 'ro' instead of 'rw'. It tends to be far more correct and makes it harder for people to accidentally alter the object's state in incompatible ways.

Read More 17 comments
Comments: 17
+ -

  Comment: Some issues with AOP (Score 1) on 2010.05.27 3:05

One thing I think you should note in your documentation is that it's very important to realize that a software must not rely on aspects to function. That is to say, if all pointcuts fail to match, the software must still be correct. Aspects should generally add behaviour, not alter it.

For example, one common example Java programmers use is to mark code as thread-safe. However, if a pointcut fails to match a function which must be thread-safe, the match fails silently. As a result, previously thread-safe code may no longer be thread-safe, but the programmer won't notice this and the tests are highly likely to not catch this.

So if your pointcuts match all methods named foo_\w+ and some bright programmer fails to notice this action at a distance (and who would fail to notice action at a distance?) and renames some functions that the pointcuts previously matches, the behaviour of the code is altered, but it's awfully hard to notice this.

This is one of the reasons I like roles. Consider this:

package Role::Munge;
use Moose::Role;

requires qw(some_method);

before 'another_method' => sub {
    my $self = shift;
    my $stuff = $self->some_method;
   # do more stuff

If some enterprising programmer renamed either 'some_method' or 'another_method', this code fails at composition time and gives composition safety. AOP silent-failure modes and action at a distance were one of the reasons roles (traits) were created in the first place.

So if you find AOP useful, that's great. Just note that if your system is incorrect without aspects, you have a major design flaw.

Read More 6 comments
Comments: 6
+ -

  Comment: Shiny! (Score 1) on 2010.04.09 2:15

by Ovid on 2010.04.09 2:15 (#71875)
Attached to: relaunch done

What forced the switch from Postgres? Even worse, why MyISAM? I assume there's a compelling story in there somewhere :)

Read More 4 comments
Comments: 4
+ -

  Comment: Re:Correctness (Score 1) on 2010.04.04 1:18

A code review may not be as useful. What users almost always want to know is:

  • Does it do what I need?
  • Is it easy to learn?
  • Can I trust it? (less so on this one, unless they'll be using it for the long haul)

One issue with code reviews is that reviews are terribly subjective. If I have a different take on how to approach a problem, I might very well ding someone on a review because I didn't understand/appreciate their code.

Read More 21 comments
Comments: 21
+ -

  Comment: Excellent Start (Score 1) on 2010.04.03 14:03

Thanks for this excellent start to the competition. I really appreciate that you're focusing on the viewpoint of a new user rather than an experienced developer.

This is particularly evident in the fact that some of your HTML is showing through rather than being rendered properly :) (e.g., <a href=""> 100-Mojo</a> instead of 100-Mojo).

Read More 21 comments
Comments: 21
+ -

  Comment: Excellent! (Score 1) on 2010.03.27 2:28

by Ovid on 2010.03.27 2:28 (#71800)
Attached to: Understanding world Perl blogging

Nice job. It's interesting reading folks from around the world.

Out of curiosity, why include blogs already in English? It's a lot more content, but as educated_foo pointed out, that's a lot to follow.

Read More 3 comments
Comments: 3
+ -

  Comment: Oops! (Score 1) on 2010.03.24 1:28

Oh, and congratulations :)

Read More 3 comments
Comments: 3
+ -

  Comment: Why ... (Score 1) on 2010.03.24 1:15

What have you stopped posting this stuff to It's great content.

Also, with an iPhone, the background task you're talking about was something I thought was restricted in the API. Am I wrong?

Read More 3 comments
Comments: 3
+ -

  Journal: Gone on 2010.03.14 3:02

Journal by Ovid on 2010.03.14 3:02
User Journal

Like many others, I'm no longer posting here very much. You'll find my new technical journal at It's much shinier.

Read More 0 comments

+ -

  Comment: Calais? (Score 1) on 2010.02.17 15:09

by Ovid on 2010.02.17 15:09 (#71707)
Attached to: So we're getting Calais back?

'Who wants to go to Birmingham?' he said. 'In the Pas-de-Calais the French lifestyle is better. And as for the food over there, well, forget it.'

Um, having spent Christmas in Calais, it's nothing to brag about. :)

Read More 3 comments
Comments: 3