Why ampersands you ask? Because I started programming in perl late last century :), and that's how you called procedural functions back then. Today I call OO methods via $obj-<method(), but I still call procedural functions the old fashioned way.
"As iron sharpens iron, so one man sharpens his friend." So I'm open being brought into the 21st century. :) Perhaps I should read "Modern Perl"?
To your point, and the point of the other anonmonk, I am slightly perplexed on how to call my own web service. I did try:
$self->on(json => sub...
but the affects were still the same in that output from the anonymous procedure called, or methods called from inside that anonymous procedure, etc. was being saved until the procedure ended, not being delivered as it was produced. (I stripped down my code to produce this simplified example. I would be happy to repost using "on(json" if you'd like.)
In reply to Re^2: real-time output from Mojolicious WebSockets?
by BroFish
in thread real-time output from Mojolicious WebSockets?
by BroFish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |