App-Foca
view release on metacpan or search on metacpan
author:
- Pablo Fischer <pablo@yahoo-inc.com>
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
requires:
Cache::FastMmap: 0
Data::Dumper: 0
Exporter: 0
File::Basename: 0
FindBin: 0
HTTP::Daemon: 0
HTTP::Response: 0
HTTP::Status: 0
IPC::Cmd: 0
Linux::Proc::Net::TCP: 0
Log::Log4perl: 0
Moose: 0
Makefile.PL view on Meta::CPAN
WriteMakefile(
NAME => 'App::Foca',
AUTHOR => q{Pablo Fischer <pablo@yahoo-inc.com>},
VERSION_FROM => 'lib/App/Foca/Server.pm',
ABSTRACT => 'Foca application - server and client',
SKIP => ['examples/example_commands.yaml',
'examples/foca-client', 'examples/foca-server'],
PREREQ_PM => {
'Cache::FastMmap' => 0,
'Data::Dumper' => 0,
'Exporter' => 0,
'File::Basename' => 0,
'FindBin' => 0,
'HTTP::Status' => 0,
'HTTP::Response' => 0,
'HTTP::Daemon' => 0,
'IPC::Cmd' => 0,
'Linux::Proc::Net::TCP' => 0,
'Log::Log4perl' => 0,
'Moose' => 0,
examples/foca-client view on Meta::CPAN
#!/usr/local/bin/perl
#
# foca-client
#
# Author(s): Pablo Fischer (pablo@pablo.com.mx)
# Created: 08/01/2012 12:43:34 AM UTC 12:43:34 AM
use strict;
use warnings;
use Data::Dumper;
use FindBin;
use lib "$FindBin::RealBin/../lib/";
use App::Foca::Client;
my $command = shift @ARGV || 'true';
my $port = 6666;
my $debug = 1;
my $client = App::Foca::Client->new(
port => $port,
examples/foca-server view on Meta::CPAN
#!/usr/local/bin/perl
#
# foca-server
#
# Author(s): Pablo Fischer (pablo@pablo.com.mx)
# Created: 08/01/2012 12:43:34 AM UTC 12:43:34 AM
use strict;
use warnings;
use Data::Dumper;
use FindBin;
use lib "$FindBin::RealBin/../lib/";
use App::Foca::Server;
my $port = 6666;
my $timeout = 60;
my $commands = "$FindBin::RealBin/example_commands.yaml";
my $debug = 1;
my $server = App::Foca::Server->new(
lib/App/Foca/Client.pm view on Meta::CPAN
sub parse_host {
my ($host) = @_;
my $status = $host->{'ok'} ? 'OK' : 'ERROR';
print "$status: $host->{'hostname'}: $host->{'output'}\n";
}
=cut
use strict;
use warnings;
use Data::Dumper;
use FindBin;
use HTTP::Response;
use Moose;
use Parallel::ForkManager;
use WWW::Curl::Easy;
use YAML::Syck qw(LoadFile);
# Foca libs/modules
use App::Foca::Tools::Logger;
=head1 Attributes
lib/App/Foca/Server.pm view on Meta::CPAN
I<Foca-Cmd-Params>.
There are two ways to update the list of commands once the server started: One
is by obviously restarting it and the other one is via localhost send a
HTTP request to localhost:yourport/reload.
=cut
use strict;
use warnings;
use Cache::FastMmap;
use Data::Dumper;
use Fcntl;
use File::Basename;
use FindBin;
use HTTP::Status qw(:constants status_message);
use IPC::Cmd qw(run_forked);
use Linux::Proc::Net::TCP;
use Moose;
use Time::HiRes qw(time);
use YAML::Syck qw(LoadFile);
# Foca libs/modules
lib/App/Foca/Tools/Logger.pm view on Meta::CPAN
=head2 DESCRIPTION
Main logger interface, uses log4perl
=cut
use strict;
use warnings;
use Exporter 'import';
use vars qw(@EXPORT_OK @EXPORT);
use Data::Dumper;
use File::Basename;
use FindBin;
use Log::Log4perl qw(:easy get_logger :levels);
@EXPORT_OK = qw(init_logger use_debug log_debug log_error log_info log_warn log_die log_connection log_request);
@EXPORT = @EXPORT_OK;
my $LOGGER = undef;
my $USE_DEBUG = 0;
( run in 0.354 second using v1.01-cache-2.11-cpan-4d50c553e7e )