CatalystX-Restarter-GTK
view release on metacpan or search on metacpan
lib/CatalystX/Restarter/GTK.pm view on Meta::CPAN
$scrolled_win->add($textview);
$win->add($scrolled_win);
$win->set_default_size(800, 400);
$win->set_size_request(100, 100);
return $win;
}
# Shows collected messages in a new window
sub show_msg {
my ($self) = @_;
unless ($self->{win_msg}) {
$self->{win_msg} = $self->get_msg_window;
}
$self->{win_msg}->show_all;
}
# Clears text buffer.
sub clear_msg {
$_[0]->{msg_buffer}->set_text(q{});
}
sub set_restart_handler {
$_[0]->{bt_restart}->signal_connect('activate', $_[1]);
}
1;
=pod
=head1 NAME
CatalystX::Restarter::GTK - GTK based Catalyst server restarter.
=head1 SYNOPSIS
Set environment variable CATALYST_RESTARTER to CatalystX::Restarter::GTK. Then start server with -r (auto restart on file changes) option.
export CATALYST_RESTARTER=CatalystX::Restarter::GTK
perl script/myapp_server -r
You can also create a shell script and add a shortcut to panel. This avoids need of starting terminal.
#!/bin/bash
cd /home/username/myapp/trunk/
export CATALYST_RESTARTER=CatalystX::Restarter::GTK
perl script/myapp_server.pl -r
To use this restarter for specific application only, set appropirate envioronment variable.
MYAPP_RESTARTER=CatalystX::Restarter::GTK
=head1 DESCRIPTION
This module provides GUI interface for controlling Catalyst server and viewing console output generated. It captures both STDOUT and STDERR.
It provides tray icon in GNOME notification area and a GTK window on desktop. It is set always on top by default. You can drag window to any screen corner for convenience.
Server can be controlled from window as well as tray icon. You can hide window by minimizing it. Tray icon changes according to server status.
User can view console output and manually restart server from menu.
Whenever any file of project is updated, developer can immediately check server status without switching to console.
=head1 NOTES
This module extends Catalyst::Restarter and depends on its _watcher and _handle_events.
=head1 AUTHOR
Dhaval Dhanani L<mailto:dhaval@cpan.org>
=head1 LICENCE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
=head1 COPYRIGHT
This library is copyright (c) 2011 the above named AUTHOR and CONSTRIBUTOR(s).
=cut
( run in 1.555 second using v1.01-cache-2.11-cpan-d06a3f9ecfd )