Closed Skeeve closed 4 years ago
https://github.com/jhthorsen/mojolicious-plugin-openapi/blob/e310f388a80928c37cd670a64648dea4b15b9589/t/basic-custom-formats.t#L14
$oap->validator->formats->{need_to_be_x} = sub { (defined $_[0] && $_[0] eq 'x') ? undef : 'Not x.' };
Otherwise you'll get messages like this upon startup:
iplist_1 | Use of uninitialized value $_ in pattern match (m//) at /home/scripts/iplist/lib/IPList.pm line 57.
(I used a pattern match not an eq)
eq
IPList.pm is not part of this repo.
Sorry - That was just the errormessage from my repo when I followed the instructions.
https://github.com/jhthorsen/mojolicious-plugin-openapi/blob/e310f388a80928c37cd670a64648dea4b15b9589/t/basic-custom-formats.t#L14
Otherwise you'll get messages like this upon startup:
(I used a pattern match not an
eq
)