Modestas Vainius wrote:
> +               # Now look for a more specific build system that is 
> auto-buildable in
> +               # both any previous and current steps.

So says the comment, and the commit message, but not the code:

> +                     for my $prevstep (BUILD_STEPS) {
> +                             last if ($prevstep eq $step);
> +
> +                             # Find the first build system that is 
> auto-buildable in $prevstep.
> +                             for $system (@buildsystems) {
> +                                     next unless defined $system;
> +                                     $system = 
> create_buildsystem_instance($system, @_) unless ref $system;
> +                                     if 
> ($system->check_auto_buildable($prevstep)) {
> +                                             # If a candidate build system 
> is both more specific than the
> +                                             # base build system, and 
> auto-buildable in current step, it's
> +                                             # the one we are looking for.
> +                                             if ($system->isa(ref $base) && 
> $system->check_auto_buildable($step)) {
> +                                                     return $system;

This may return a system before it has tested every prior step in
BUILD_STEPS.

> +                                             }
> +                                             else {
> +                                                     # It's pointless to 
> consider this build system once again
> +                                                     $system = undef;

BTW,
This mutates @buildsystems via the binding established via the foreach.
But that is a) too far above for that the be clear on first reading, and
b) one of perl's absolute worst features for code maintainability, which
I prefer to avoid.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to