LibreCat / Catmandu-Identifier

Namespace for handling/fixing identifier, e.g. ISBN, ISSN
https://metacpan.org/release/Catmandu-Identifier
Other
2 stars 2 forks source link

Isbn fixes crash when giving dirty data #6

Closed phochste closed 9 years ago

phochste commented 9 years ago
# test: "hdslfsdhf jkhdf kjshfkjasdhf"
isbn(test)  # crash

# temporary fix
do maybe()
    isbn(test)
end
vpeil commented 9 years ago

what would you expect?

phochste commented 9 years ago

If the crash is a feature then it should be documented and e.g. add a do maybe() or a is_valid_isbn example in the documentation.

If the crash isn't a feature than indeed leave the field untouched.

At least the is_valid_isbn should never crash

vpeil commented 9 years ago

I agree: is_valid_isbn should never crash.