NAME
App::HistHub - Sync shell history between multiple PC.
SYNOPSIS
use App::HistHub;
my $hh = App::HistHub->new(
hist_file => 'path to your history file',
api_endpoint => 'http://localhost:3000/',
);
$hh->run;
DESCRIPTION
App::HistHub is an application that enables you to sync shell history between multiple computers.
This application consists of two modules: client module (histhubd.pl) and server module (histhub_server.pl).
You need one histhub server. To bootup the server, type following command:
histhub_server
This server receive updating history data from one client, and broadcast to others.
You also need one client daemon in each computer that you want to share history. To boot client, type following command:
histhubd --histfile=/path/to/your_history_file --server=http://your_server_address
This client send updated history to server, and receive new history from other clients.
METHODS
new
my $hh = App::HistHub->new( %options );
Create HistHub object.
Available obtions are:
- hist_file
-
History file path to watch update
- api_endpoint
-
Update API URL.
spawn
Create POE session and return session object.
run
Spawn and start POE::Kernel
uri_for
$hh->uri_for( $path )
Build api url
append_history
$hh->append_history( $session, $api_response );
Update history file
POE METHODS
poe__start
poe_init
poe_hist_line
poe_hist_rollover
poe_set_poll
poe_poll
AUTHOR
Daisuke Murase <typester@cpan.org>
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.