Could you change that to `.. unless scalar @{$options{repolist}};` please?  Perfect otherwise!