user-pic

Christian Hansen

Subscribe to feed Recent Actions from Christian Hansen

  • john napiorkowski commented on Websockets in Catalyst

    Instead of reaching into $env, you want want to look at the -> io_fh method in Catalyst::Request. We added this and some other PSGI 'jailbreak' features to Catalyst about 13 years ago. Sadly the Advent site is gone but the articles remain on github:

    https://github.com/perl-catalyst/2013-Advent-Staging/tree/master/1to4-Nonblocking-Streaming/eg

    https://github.c…

  • Nerdvana commented on Websockets in Catalyst

    Wow, indeed I missed this. To be fair, the mechanism of not writing the response as a side effect of accessing an attribute on the Request object is a bit unintuitive and undocumented... but if I had grepped the source for 'websocket' I would have found

    ```
    # Support skipping finalize for psgix.io style 'jailbreak'. Used to support
    # stuff like cometd and websockets
    if($c->request->_has_io_fh) {
    $c->log_response;
    return;
    }
    ```

    I remember digging through the source code in 2019 and finding that finalize_body and _build_write_fh w…

  • Dean commented on Installing Bit::Vector on Debian 13 (Trixie)

    just inline css

  • Mohawk commented on Happy sharing

    For interoperating between PDL and Buffer, there is a (for now still undocumented) new method, new_around_datasv, which is also zero-copy:


    my $pdl = PDL->new_around_datasv(0+$buf->as_scalar);
    $pdl->set_datatype(double->enum);
    $pdl->setdims([10000]);
    $pdl->set_donttouchdata;
    printf "mean=%.4f stddev=%.4f\n", $pdl->stats;

  • JJ Atria commented on Installing Bit::Vector on Debian 13 (Trixie)

    This unblocked me at $work this morning. Thanks for the write-up!

Subscribe to feed Responses to Comments from Christian Hansen

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.