in reply to Perl Module - take in a String, output object

You didn't say what you wanted this object to do...

If you want it to store the range list, and then be used as a sort of iterator, then you might want to split the work in two:

Of course, it may be that you seldom have large enough ranges to care about the size of a pre-calculated list.