The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Pusher - Interface to the Pusher WebSockets API

VERSION

Version 0.01

SYNOPSIS

    use WWW::Pusher;

    my $pusher   = WWW::Pusher->new(key => 'YOUR API KEY', channel => 'test_channel');
    my $response = $pusher->trigger(event => 'my_event', data => 'Hello, World!');

METHODS

new(key => $api_key, channel => $channel_id, [ host => $host, port => $port, debug => 1 ])

Creates a new WWW::Pusher object. Both API key and Channel are mandatory.

You can optionally specify the host and port keys and override using pusherapp.com's server if you wish. Setting debug to a true value will return an LWP::UserAgent response object in the event a trigger fails.

trigger(event => $event_name, data => $data, [socket_id => $socket_id, debug => 1])

Send an event to the channel. The event name should be a scalar, but data could in theory be a hash/arrayref.

Returns "OK" on success, or undef on failure. Setting "debug" to a true value will return an LWP::UserAgent response object.

AUTHOR

Squeeks, <squeek at cpan.org>

BUGS

Please report any bugs or feature requests to bug-www::pusher at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW::Pusher. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc WWW::Pusher

You can also look for information at:

SEE ALSO

Pusher - http://pusherapp.com

LICENSE AND COPYRIGHT

Copyright 2010 Squeeks.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.