Closed zoffixznet closed 7 years ago
LGTM
Does rakudo remove s
method from IO::Handle too?
❯ prove -e 'perl6 -Ilib' t/Crust-Middleware/content-length.t
t/Crust-Middleware/content-length.t .. 1/? No such method 's' for invocant of type 'IO::Handle'
in sub content-length at /Users/skaji/src/github.com/tokuhirom/p6-Crust/lib/Crust/Utils.pm6 (Crust::Utils) line 52
in method CALL-ME at /Users/skaji/src/github.com/tokuhirom/p6-Crust/lib/Crust/Middleware/ContentLength.pm6 (Crust::Middleware::ContentLength) line 11
in block <unit> at t/Crust-Middleware/content-length.t line 53
❯ perl6 -e 'say IO::Handle.^methods'
(open nl-in close eof get getc comb words lines read readchars Supply seek tell write opened t lock unlock printf print put print-nl slurp-rest slurp spurt path IO flush encoding DESTROY native-descriptor split iterator say Str gist perl chomp nl-out)
Yes, all file tests are gone from Handle. See upgrade notice: http://rakudo.org/2017/04/17/final-notes-on-changes-due-to-io-grant-work/
You can use $handle.path.s
as substitute, but note that not all IO::Handles are path-based, so doing that is a bit flimsy
This method no longer exists.