From fe516b6b3227980ee1751e2449cdf08413710289 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Wed, 1 Nov 2023 11:10:25 -0400 Subject: [PATCH] use croak, not carp --- lib/Dancer2/Plugin/JsonApi/Registry.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Dancer2/Plugin/JsonApi/Registry.pm b/lib/Dancer2/Plugin/JsonApi/Registry.pm index 3eed412..b457d6c 100644 --- a/lib/Dancer2/Plugin/JsonApi/Registry.pm +++ b/lib/Dancer2/Plugin/JsonApi/Registry.pm @@ -45,13 +45,13 @@ sub add_type($self,$type,$definition={}) { =head2 type($type) -Returns the type's C. Throws an +Returns the type's C. Throws an error if the type does not exist. =cut sub type($self,$type) { - return $self->types->{$type} || carp "type '$type' not found\n"; + return $self->types->{$type} || croak "type '$type' not found"; } 1;