Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Mojolicious 6.40 and above #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paultcochrane
Copy link

Update the module to use the new location for the constants previously imported from Mojo::Transation::WebSocket. Their new location is now Mojo::WebSocket. This PR makes the tests pass for Mojolicious versions 6.40 and above (and hence addresses issue #3), however breaks the code for Mojolicious versions below 6.40... Do you also wish to support the older versions in any future release of MojoX::Transaction::WebSocket76?

It turns out that the build_frame method has also been moved from Mojo::Transation::WebSocket into Mojo::WebSocket and it has consequently been deprecated. How exactly this issue is to be solved is not clear, however it is good to at least be aware that the method may one day be removed.

The constants `DEBUG`, `TEXT`, and `CLOSE` were (in Mojolicious versions
below 6.40) defined in `Mojo::Transaction::WebSocket`.  They are now (in
versions 6.40 and above) defined in `Mojo::WebSocket`, also the `TEXT` and
`CLOSE` constants have been renamed with a `WS_` prefix.  The `BINARY`
constnat has been removed since it turns out this wasn't used in
`MojoX::Transaction::WebSocket76`.  This commit updates the code to use the
new constant names and thus allows the module to work with Mojolicious
versions 6.40 and above.
@KES777
Copy link

KES777 commented Apr 14, 2016

+1 it is works. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants