Perl-Toolchain-Gang / CPAN-Meta-Requirements

a set of version requirements for a CPAN dist
5 stars 15 forks source link

Optimize minimum requirements further #20

Closed dagolden closed 9 years ago

dagolden commented 9 years ago

This commit improves optimization for the case where add_minimum gets a version object that stringifies to "0".

It also optimizes the _version_object method to avoid expensive magic checks for "0" or version objects.

Some comments were added to clarify why things are optimized the way they are.

dagolden commented 9 years ago

@rjbs, I'd appreciate a third set of eyes before I merge this. (@leont already approves)

rjbs commented 9 years ago

:+1: