From: Damyan Ivanov Date: Sat, 19 Feb 2022 08:28:31 +0000 (+0000) Subject: move sub declaration before usage X-Git-Url: https://git.ktnx.net/?p=lsl.git;a=commitdiff_plain;h=3d86c18e79cfffaf61fe76a6a9bc1ea90b7b9416 move sub declaration before usage --- diff --git a/lib/App/LazyShoppingList/API.pm b/lib/App/LazyShoppingList/API.pm index 84e7fad..36f7e68 100644 --- a/lib/App/LazyShoppingList/API.pm +++ b/lib/App/LazyShoppingList/API.pm @@ -65,15 +65,15 @@ sub increment_lists_version($dbh) { return $g->lists_version; } -sub invalid_input($details = undef) { - return exception 400, - "Invalid input" . ( defined($details) ? " ($details)" : '' ); -} - sub exception($http_code, $text) { status $http_code; return { exception => $text }; } +sub invalid_input($details = undef) { + return exception 400, + "Invalid input" . ( defined($details) ? " ($details)" : '' ); +} + 1;