NAME

POE::Component::Client::Dashboard -- Dashboard cluepacket component

SYNOPSIS

use POE
use POE::Component::Client::Dashboard;

POE::Component::Client::Dashboad->spawn (
	alias => 'clue',
	host => 'localhost',
	port => 5913,
	frontend => 'app name');

...

# send this when your app displays an url
my @clues = ({Type => 'url', Relevance => 10, content => $uri});
$kernel->post ('clue', send_clue => 'error_callback', $uri, 1, \@clues);

DESCRIPTION

With this component, you can send cluepackets to a Dashboard server, so it can learn what your application is up to, and try to display information relevant to your current task.

CONSTRUCTOR

spawn (%options)

creates a new POE::Component::Client::Dashboard session. It takes several parameters:

frontend (REQUIRED)

An string to identify your app to Dashboard. Usually the name of your application.

alias (OPTIONAL)

The session alias you want to use

host (OPTIONAL)

The host of the Dashboard server to connect to. Defaults to localhost

port (OPTIONAL)

The port of the Dashboard server to connect to. Defaults to 5913

EVENTS

send_clue (error_callback, context, is_focused, [clues]);

Sends a clue to the Dashboard server. The error_callback parameter is the name of an event in the calling session that will receive a postback style call when an error occurs.

context is a unique identifier for the clue context. For example, if you were a browser, you could use the url of the web page.

is_focused is a boolean to let Dashboard know whether the user is currently working with the context. So in the browser example whether the clue is for the tab currently in view or not

clues is a listref of clue hashrefs, which have the following structure:

{
	Type => [string; see dashboard docs for useful values],
	Relevance => [integer; relevancy rating from 1-10],
	content => [the value of the clue]
}

AUTHOR & COPYRIGHTS

POE::Component::Client::Dashboard is based on POE::Component::Client::HTTP, which is written by Rocco Caputo and licenced under the same terms as Perl.

All original code is Copyright 2003 by Martijn van Beers, and licenced under the GNU GPL licence.

All comments on POE::Component::Client::Dashboard should go to Martijn van Beers via martijn@cpan.org.