view release on metacpan or search on metacpan
use Module::Build;
my $build = Module::Build->new
(
dist_version => '0.91',
module_name => 'Activator',
license => 'perl',
requires => {
'Data::Dumper' => 0,
'Log::Log4perl' => 0,
'Scalar::Util' => 0,
'IO::Capture' => 0,
'Exception::Class' => 0,
'Test::Exception' => 0,
'Test::Pod' => 0,
'Class::StrongSingleton' => 0,
'Hash::Merge' => 0,
'Time::HiRes' => 0,
'Exception::Class::TryCatch' => 0,
creation and rapid development of multi-developer distributed mixed
environment perl based software projects, especially Catalyst based
websites.
license: perl
resources:
license: http://dev.perl.org/licenses/
requires:
CGI::Cookie: 0
Class::StrongSingleton: 0
Crypt::CBC: 0
Data::Dumper: 0
Digest::SHA1: 0
Email::Send: 0
Exception::Class: 0
Exception::Class::DBI: 0
Exception::Class::TryCatch: 0
HTML::Entities: 0
Hash::Merge: 0
IO::Capture: 0
Log::Log4perl: 0
MIME::Base64: 0
Activator::DB
Activator::Dictionary
DEPENDENCIES
------------
Run: This module requires these other modules and libraries:
Data::Dumper
Log::Log4perl
Scalar::Util
IO::Capture
Exception::Class
Test::Exception
Test::Pod
Test::Harness
Class::StrongSingleton
Hash::Merge
Time::HiRes
bin/activator.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Activator::Registry;
use Activator::Config;
use Activator::Log qw( :levels );
use Exception::Class::TryCatch;
use Data::Dumper;
use Template;
use File::Find;
=head1 NAME
activator.pl - setup and manage services with an Activator project.
=head1 SYNOPSIS
activator.pl [OPTIONS] ACTION project-name
lib/Activator.pm view on Meta::CPAN
Make sure you edit all the configurations necessary when creating a new dev environment
=back
Activator solves all of the above, and many more problems. Read the L<Activator::Tutorial> to find out how.
=head1 DEPENDANCIES
Data::Dumper
Scalar::Util
IO::Capture
Exception::Class
Test::Exception
Test::Pod
Class::StrongSingleton
Hash::Merge
Time::HiRes
Exception::Class::TryCatch
Exception::Class::DBI
lib/Activator/Config.pm view on Meta::CPAN
package Activator::Config;
use Data::Dumper;
use Activator::Registry;
use Activator::Log qw( :levels );
use Scalar::Util qw( reftype );
use Exception::Class::TryCatch;
use base 'Class::StrongSingleton';
=head1 NAME
C<Activator::Config> - provides a merged configuration to a script
combining command line options, environment variables, and
lib/Activator/DB.pm view on Meta::CPAN
package Activator::DB;
use strict;
use warnings;
use Activator::Log qw( :levels );
use Activator::Registry;
use DBI;
use Exception::Class::DBI;
use Exception::Class::TryCatch;
use Data::Dumper;
use Time::HiRes qw( gettimeofday tv_interval );
use Scalar::Util;
use base 'Class::StrongSingleton';
# constructor: implements singleton
sub new {
my ( $pkg, $conn_alias ) = @_;
my $self = bless( {}, $pkg);
lib/Activator/Emailer.pm view on Meta::CPAN
package Activator::Emailer;
use strict;
use Email::Send;
use MIME::Lite;
use Template;
use Activator::Registry;
use Exception::Class::TryCatch;
use Data::Dumper;
use Hash::Merge;
use Activator::Log qw( :levels );
=head1 NAME
Activator::Emailer - Send emails from anywhere within a project in the same way using role-based configuration.
=head1 SYNOPSIS
Configure defaults with Activator::Registry configuration (See
lib/Activator/Log.pm view on Meta::CPAN
package Activator::Log;
require Exporter;
push @ISA, qw( Exporter );
@EXPORT_OK = qw( FATAL ERROR WARN INFO DEBUG TRACE );
%EXPORT_TAGS = ( levels => [ qw( FATAL ERROR WARN INFO DEBUG TRACE ) ] );
use Log::Log4perl;
use Scalar::Util;
use Data::Dumper;
use Activator::Registry;
use base 'Class::StrongSingleton';
=head1 NAME
Activator::Log - provide a simple wrapper for L<Log::Log4perl> for use
within an Activator project.
=head1 SYNOPSIS
lib/Activator/Options.pm view on Meta::CPAN
package Activator::Options;
use Data::Dumper;
use Activator::Registry;
use Activator::Log qw( :levels );
use Scalar::Util qw( reftype );
use Exception::Class::TryCatch;
use base 'Class::StrongSingleton';
=head1 NAME
THIS MODULE DEPRECATED. USE L<Activator::Config> instead.
#!perl
use warnings;
use strict;
use Test::More;
use Test::Exception;
use Data::Dumper;
use DBI;
BEGIN{
$ENV{ACT_REG_YAML_FILE} ||= "$ENV{PWD}/t/data/DB-test.yml";
}
if ( ! ( $ENV{ACT_DB_TEST_ENGINE} && (
( $ENV{ACT_DB_TEST_ENGINE} eq 'mysql' && $ENV{ACT_DB_TEST_USER} && $ENV{ACT_DB_TEST_PASSWORD} ) ||
( $ENV{ACT_DB_TEST_ENGINE} eq 'Pg' && $ENV{ACT_DB_TEST_USER} ) ) ) ) {
t/Dictionary-default.t view on Meta::CPAN
use strict;
BEGIN{
$ENV{ACT_REG_YAML_FILE} ||= "$ENV{PWD}/t/data/Dictionary-default.yml";
}
use Test::More;
use Test::Exception;
use Activator::Registry;
use Activator::Dictionary;
use Data::Dumper;
use IO::Capture::Stderr;
plan skip_all => 'test requires access to MySQL DB that can connect with \'mysql -u root\'. Set TEST_ACT_DB to enable this test' unless $ENV{TEST_ACT_DB};
my ($dict, $val, $capture, $line);
# test that when the db loads, duplicated column in a different table
# definition warns appropriately
system( "cat $ENV{PWD}/t/data/Dictionary-create-test.sql | mysql -u root");
t/Dictionary-dies.t view on Meta::CPAN
use strict;
BEGIN{
$ENV{ACT_REG_YAML_FILE} ||= "$ENV{PWD}/t/data/Dictionary-dies.yml";
}
use Test::More;
use Test::Exception;
use Activator::Registry;
use Activator::Dictionary;
use Data::Dumper;
plan skip_all => 'test requires access to MySQL DB that can connect with \'mysql -u root\'. Set TEST_ACT_DB to enable this test' unless $ENV{TEST_ACT_DB};
my ($dict, $val);
# test loading from files. Gotta hack the registry to make this work for testing.
my $config = Activator::Registry->get( 'Activator::Dictionary' );
$config->{dict_files} = "$ENV{PWD}/t/data/Dictionary";
# get the english dictionary
t/Emailer.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use Test::More;
use Test::Exception;
use Data::Dumper;
if ( ! $ENV{TEST_ACT_EMAILER_ADDR} ) {
plan skip_all => 'set TEST_ACT_EMAILER_ADDR (a "to" address) to enable this test';
}
else {
plan tests => 1;
}
# DEFINE THIS TO TEST
my $to = $ENV{ACT_EMAILER_TEST_ADDR};
t/Exception.t view on Meta::CPAN
#!/usr/bin/perl -w
use Test::More tests => 8;
use Activator::Exception;
use Exception::Class::TryCatch;
use Data::Dumper;
my $err;
try eval {
Activator::Exception->throw( 'MyObj', 'MyCode' );
};
catch $err;
ok( $err, "Can catch $err");
$err = undef;
t/Options-01.t view on Meta::CPAN
#!perl
use warnings;
use strict;
use Test::More tests => 6;
use Activator::Options;
use Activator::Log qw( :levels );
use Data::Dumper;
use IO::Capture::Stderr;
#Activator::Log->level( 'DEBUG' );
$ENV{ACT_OPT_project} = 'test';
my $proj_dir = "$ENV{PWD}/t/data/test_project";
my $user_yml = "$ENV{USER}.yml";
system( qq( cp $proj_dir/USER.yml $proj_dir/$user_yml));
t/Options-02.t view on Meta::CPAN
#!perl
use warnings;
use strict;
use Test::More tests => 7;
use Activator::Options;
use Activator::Log;
use Data::Dumper;
use IO::Capture::Stderr;
#Activator::Log->level( 'DEBUG' );
$ENV{ACT_OPT_project} = 'test';
my $proj_dir = "$ENV{PWD}/t/data/test_project";
my $user_yml = "$ENV{USER}.yml";
system( qq( cp $proj_dir/USER.yml $proj_dir/$user_yml));
@ARGV = (# '--debug', # debug this test: doesn't break tests
t/Registry-static.t view on Meta::CPAN
#!/usr/bin/perl -w
use Test::More tests => 9;
use Activator::Registry;
use Activator::Log;
use Data::Dumper;
BEGIN {
$ENV{ACT_REG_YAML_FILE} ||= "$ENV{PWD}/t/data/Registry-test.yml";
}
Activator::Log->level('DEBUG');
# basic functionality
my $realm = Activator::Registry->get_realm( 'default');
my $list = Activator::Registry->get( 'list_of_5_letters');
view all matches for this distributionview release on metacpan - search on metacpan