Closed davidcantrell-bb closed 3 years ago
JSON::Validator->new()->schema(q!{ "type": "object" } !)
note the newline before the closing quote.
There should be no warning
A warning is emitted: Unsuccessful stat on filename containing newline at /blahblah/JSON/Validator.pm line 317.
Unsuccessful stat on filename containing newline at /blahblah/JSON/Validator.pm line 317.
Tightly scoped no warnings 'newline';, something like ...
no warnings 'newline';
my $loadable = do { no warnings 'newline'; (blessed $source && ($source->can('scheme') || $source->isa('Mojo::File'))) || -f $source || (!ref $source && $source =~ /^\w/); };
I just chased this error message for hours until I looked for open issues, thanks!
There, have a trivial fix :-)
This is now fixed in #233.
Steps to reproduce the behavior
note the newline before the closing quote.
Expected behavior
There should be no warning
Actual behavior
A warning is emitted:
Unsuccessful stat on filename containing newline at /blahblah/JSON/Validator.pm line 317.
Suggested fix
Tightly scoped
no warnings 'newline';
, something like ...