vti / sockjs-perl

SockJS Perl Plack/PSGI implementation
Other
21 stars 4 forks source link

Can't locate object method "read" via package "IO::File" #10

Closed eserte closed 6 years ago

eserte commented 6 years ago

With 0.05 and perl 5.12.x the test suite fails:

#   Failed test 'No tests run for subtest "return error when content length not equals actual read data"'
#   at t/transport/jsonp-send.t line 40.
Can't locate object method "read" via package "IO::File" at /tmpfs/.cpan-build-cpansand/2018082618/SockJS-0.05-2/blib/lib/SockJS/Transport/JSONPSend.pm line 51.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 2.
t/transport/jsonp-send.t ..... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/2 subtests 
...
#   Failed test 'No tests run for subtest "return error when content length not equals actual read data"'
#   at t/transport/xhr-send.t line 40.
Can't locate object method "read" via package "IO::File" at /tmpfs/.cpan-build-cpansand/2018082618/SockJS-0.05-2/blib/lib/SockJS/Transport/XHRSend.pm line 46.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 2.
t/transport/xhr-send.t ....... 
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/2 subtests 

I vaguely remember that this can be fixed with a "use IO::File", but I can be wrong.

With older perls (5.10.x, 5.8.x) the error message is different:

Can't locate object method "read" via package "IO::Handle" at /home/cpansand/.cpan/build/2018082618/SockJS-0.05-0/blib/lib/SockJS/Transport/JSONPSend.pm line 51.
vti commented 6 years ago

That's fixed in the previous issues.