Updates to Business::ISBN

brian_d_foy on 2005-08-14T17:52:20

I've made a couple of important updates to Business::ISBN.

First, I somehow neglected to expose a method to get the country group name. You could get the country code with country_code(), but not the name attached to that number. Now there is a country() method.

Second, I had a big newbie error. In checking the publisher code, I did something like:

return unless $self->{publisher_code};

However, that publisher code can be '0'. I guess that's okay. For instance, in Albania (country code 99927), there are three publisher codes: 0, 1, and 2. I need to validate the ISBN so it still works if the publisher code is 0.

return unless defined $self->{publisher_code};

There are actually several other country codes that do this, even though the ones I cared about used '00' because those country groups have a lot of publishers.

Upgrade to 1.82 when it makes it way to your favorite CPAN mirror. :)


Very typical, indeed.

ambs on 2005-08-14T18:00:38

That one and the $foo||="zbr" are too common. When will we have $foo//="zbr", by the way? :)