# Nephia-Plugin-PocketIO **Repository Path**: mirrors_gitpan/Nephia-Plugin-PocketIO ## Basic Information - **Project Name**: Nephia-Plugin-PocketIO - **Description**: Read-only release history for Nephia-Plugin-PocketIO - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-10-20 - **Last Updated**: 2026-02-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # NAME Nephia::Plugin::PocketIO - Nephia plugin that provides DSL for using PocketIO # SYNOPSIS Your app class ... package MyApp; use Nephia plugins => ['PocketIO']; path '/' => sub { +{ template => 'index.html' }, }; pocketio 'message' => sub { my ($socket, $message) = @_; $socket->emit('response', sub {sprintf('you said "%s"', $message)} ); }; and, your template(view/index.html) ... MyApp # DOWNLOAD ASSETS If you use this plugin, it try to download "socket.io.js" into $APPROOT/root/static/socket.io.js from https://raw.github.com/vti/pocketio/master/examples/chat/public/socket.io.js # AUTO LOADING FEATURE When calls Nephia::View::\*::render(), Nephia::Plugin::PocketIO injects javascript-tag(for loading socket.io.js) into result html. # LICENSE Copyright (C) ytnobody / satoshi azuma. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. # SEE ALSO PocketIO Nephia # AUTHOR ytnobody / satoshi azuma