Activator
view release on metacpan or search on metacpan
bin/activator.pl view on Meta::CPAN
--log_level : One of TRACE, DEBUG, INFO, WARN, ERROR, FATAL (see L<Activator::Log>)
--sync_dir : ignore sync_dir setting from configuration, use this.
Todo:
--activator_codebase=<path> : use alternate Activator codebase (for Activator development)
See L<Activator::Tutorial> for a description of how to configure an Activator project.
=cut
# $config, $args, $project, $action and the current apache pid are globally interesting
my ( $config, $args, $project, $action, $httpd_pid );
try eval {
# Act::Config requires that project be set via an option or be the
# last arg, hence the flag after undef below
$config = Activator::Config->get_config( \@ARGV, undef, 1 );
};
if ( catch my $e ) {
die( "Error while processing command line options: $e" );
bin/activator.pl view on Meta::CPAN
my $project = shift;
if ( $config->{sync_target} eq '/' ) {
ERROR( "target sync_dir is root dir! Refusing to continue this DANGEROUS operation");
exit(1);
}
my $cmd;
# before blowing away the run dir, grab the httpd pid and store it globally
if ( -f $config->{apache2}->{PidFile}) {
INFO("Looking for pid file...");
$cmd = 'cat '. $config->{apache2}->{PidFile};
INFO( $cmd );
$httpd_pid = `$cmd`;
chomp $httpd_pid;
}
# convenience vars
my $project_codebase = $config->{project_codebase};
lib/Activator.pm view on Meta::CPAN
Activator provides modules to support rapid software development throughout the software life-cycle:
=over
=item *
Role-based project configuration supporting development, QA, and production needs
=item *
A globally accessible variable registry for all components within a project including the Catalyst web app, crons and daemons
=item *
Key/Value dictionary lookups provide context sensitive messages to users and/or logs
=item *
Template based email using a role-based delivery mechanism
=item *
lib/Activator/Log.pm view on Meta::CPAN
Your project C<log4perl.conf> gets loaded based on your
L<Activator::Registry> configuration. If you do not have a Log4perl
config available, the log level is set to WARN and all output goes to
STDERR.
See the section L<CONFIGURATION> for more details.
=head2 Exporting Level Functions
Log::Log4perl logging functions are exported into the global
namespace if you use the C<:levels> tag
use Activator::Log qw( :levels );
&FATAL( $msg );
&ERROR( $msg );
&WARN( $msg );
&INFO( $msg );
&DEBUG( $msg );
&TRACE( $msg );
lib/Activator/Registry.pm view on Meta::CPAN
Activator::Registry->register_file( $file, $realm );
#### register hash into realm
Activator::Registry->register_hash( $mode, $hashref, $realm );
#### use ${} syntax in your registry for variables
Activator::Registry->replace_in_realm( 'default', $replacements_hashref );
=head1 DESCRIPTION
This module provides global access to a registry of key-value pairs.
It is implemented as a singleton, so you can use this Object Oriented
or staticly with arrow notation. It supports getting and setting of
deeply nested objects. Setting can be done via YAML configuration
files.
=head1 CONFIGURATION FILES
Configuration files are YAML files.
=head2 Registry Within Another Configuration File
share/apache2/conf/httpd.conf.tt view on Meta::CPAN
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
share/conf/default-project.yml view on Meta::CPAN
# this is the default realm, and by default we don't define realms in this file
#
act_config_no_realms: 1
#
# default to the production realm
#
realm: production
#
# global debug flag: see perldoc Activator::Log for more specifics on debug logging.
#
debug: 1
#
# This is the name of the project, most likely the top of your perl
# namespace for a catalyst app, i.e.: MyApp
#
project_name:
#
( run in 0.495 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )