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

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.
  • First of all:

    sub _build_paths {
        my ( $self, $class, @parents ) = @_;

        my @paths = $self->paths;
        for my $i ( 0 .. $#paths ) {
            my $path = $paths[$i];
            if ( $path->[-1] eq $class ) {
                my @new_paths = map { [@$path, $_] } @parents;
                splice @paths, $i, 1, @new_paths;

  • Arg! You're right, I totally biffed that one. It took me long enough to realize the general shape of the algorithm that I just totally missed what I was iterating over. I've added your code.