CatalystX-Crudite

 view release on metacpan or  search on metacpan

lib/CatalystX/Crudite/Script/Create.pm  view on Meta::CPAN

package CatalystX::Crudite::Script::Create;
use strict;
use warnings;
use Try::Tiny;
use Class::Load qw(load_class);

sub run {
    my $dist_name = shift;
    my $type      = shift @ARGV;
    my $class     = __PACKAGE__ . "::\L\u$type";
    try {
        load_class($class);
    }
    catch {

share/starter/Makefile.PL  view on Meta::CPAN

all_from 'lib/<% dist_module %>.pm';

requires 'CatalystX::Crudite' => '<% crudite_version %>';

test_requires 'App::ForkProve';
test_requires 'DBICx::TestDatabase';
test_requires 'Plack::Middleware::Debug';
test_requires 'Plack::Middleware::Debug::DBIC::QueryLog';
test_requires 'Test::More' => '0.88';
test_requires 'Test::WWW::Mechanize::Catalyst';
test_requires 'Try::Tiny';

catalyst;

install_script glob('script/*.pl');
auto_install;
WriteAll;

share/starter/t/DB.pm  view on Meta::CPAN


# Setup everything for mechanize tests and create a temporary in-memory DB for
# every separate test file so you can run tests in parallel without worrying
# about interference.
#
# See
# http://modernperlbooks.com/mt/2012/08/testing-catalyst-and-dbic-with-an-in-memory-database.html

use strict;
use warnings;
use Try::Tiny;
use DBICx::TestDatabase;
use <% dist_module %>;
use <% dist_module %>::Util::Primer qw(prime_database);
use Test::WWW::Mechanize::Catalyst '<% dist_module %>';
my $schema;
sub make_schema { $schema //= DBICx::TestDatabase->new(shift) }

sub install_test_database {
    my ($app, $schema) = @_;
    <% dist_module %>->model('DB')->schema($schema);



( run in 0.738 second using v1.01-cache-2.11-cpan-05444aca049 )