summaryrefslogtreecommitdiffstats
path: root/MANIFEST
diff options
context:
space:
mode:
authorMurilo Ijanc <[email protected]>2026-07-27 20:34:36 -0300
committerMurilo Ijanc <[email protected]>2026-07-27 20:34:36 -0300
commitf2f3e5b5b22f5db49670391fb747a52fd492b9db (patch)
tree3d02d13f3111bdd7381470d3fd3db1f58e00bc8c /MANIFEST
parent0bc578d6d334c7f1ccaf329cd61bb8bce76b7f59 (diff)
downloadperl-0.2.0.tar.gz
Carry the municipality on a CEP that does not existHEADv0.2.0main
A CEP that fails is rarely a random number. It is usually someone who knows the city and guessed the digits, and the classic guess is the -000 that 957 municipalities never received. The API now answers those 404s with a faixa block naming the municipality that owns the band, so the library can say "25845000 does not exist in Areal/RJ" instead of "not found". It stays an error: lookup still throws Cepis::Error::CEPNotFound, and the faixa hangs off the exception rather than turning a miss into an address. Parsing it is deliberately forgiving — a missing, empty or malformed block yields undef, because losing the clean not-found to a parse failure would be a worse outcome than losing the context. cep_ini and cep_fim are the smallest and largest CEP that actually exist, not the bounds the Correios publish, and the interval between them is sparse. That is why ceps is exposed alongside them and why the docs say twice that the pair is not a list of valid CEPs.
Diffstat (limited to 'MANIFEST')
-rw-r--r--MANIFEST2
1 files changed, 2 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 115bae1..caf930e 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,6 +7,7 @@ lib/Cepis/Address.pm
lib/Cepis/CSV.pm
lib/Cepis/Client.pm
lib/Cepis/Error.pm
+lib/Cepis/Faixa.pm
lib/Cepis/Geo.pm
lib/Cepis/Health.pm
t/00-load.t
@@ -18,4 +19,5 @@ t/05-batch.t
t/06-health.t
t/07-config.t
t/08-tls.t
+t/09-faixa.t
t/lib/TestServer.pm