For PROXYSUBS, loop with do {} not while, as there is always at least 1 entry.
authorNicholas Clark <nick@ccl4.org>
Fri, 22 Oct 2010 14:58:36 +0000 (15:58 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 22 Oct 2010 14:58:36 +0000 (15:58 +0100)
cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm

index 434af15..0038831 100644 (file)
@@ -134,11 +134,10 @@ sub boottime_iterator {
     my $athx = $self->C_constant_prefix_param();
 
     return sprintf <<"EOBOOT", &$generator(&$extractor($iterator));
-        while ($iterator->name) {
+        do {
            $subname($athx $hash, $iterator->name,
                                $iterator->namelen, %s);
-           ++$iterator;
-       }
+       } while ((++$iterator)->name);
 EOBOOT
 }