Ado

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

use 5.014000;
use strict;
use warnings FATAL => 'all';
use FindBin;
use lib("$FindBin::Bin/lib");
use Ado::Build;

#unset temporarily $ENV{TEST_AUTHOR}
#to generate fewer dependencies dynamically
#see http://localhost:3000/perldoc/CPAN/Meta/Spec#dynamic_config
my $author = {
    build_requires => {

        #Modules for QA - while developping
        'Perl::Tidy'          => '20140711',

lib/Ado/Build.pm  view on Meta::CPAN


Ado::Build - Custom routines for Ado installation

=head1 SYNOPSIS

  #Build.PL
  use 5.014000;
  use strict;
  use warnings FATAL => 'all';
  use FindBin;
  use lib("$FindBin::Bin/lib");
  use Ado::Build;
  my $builder = Ado::Build->new(..);
  $builder->create_build_script();

  #on the command line
  cd /path/to/cloned/Ado
  perl Build.PL
  ./Build
  ./Build test
  #change/add some code

t/ado-build.t  view on Meta::CPAN

#ado-build.t
use Mojo::Base -strict;
use Test::More;
use File::stat;
use File::Spec::Functions qw(catdir catfile catpath);
use File::Temp qw(tempdir);
use lib(-d 'blib' ? 'blib/lib' : 'lib');
use Ado::Build;
use Mojo::File qw(path);
$SIG{__WARN__} = sub {
    return if $_[0] =~ m|Wide\scharacter\sin\sprint|x;
    warn @_;
};
if (not $ENV{TEST_AUTHOR}) {
    my $msg = 'Author test.  Set $ENV{TEST_AUTHOR} to a true value to run.';
    plan(skip_all => $msg);
}

t/plugin/example-00.t  view on Meta::CPAN

use Mojo::Base -strict;
use Cwd qw(abs_path);
use File::Basename;
use File::Spec::Functions qw(catdir updir catfile);
use Test::More;

BEGIN {
    $ENV{MOJO_HOME} = abs_path(catdir(dirname(__FILE__), updir, 'ado'));
    $ENV{MOJO_CONFIG} = abs_path(catfile($ENV{MOJO_HOME}, '../../etc/ado.conf'));
}
use lib("$ENV{MOJO_HOME}/lib");
use Test::Mojo;
my $t   = Test::Mojo->new('Ado');
my $app = $t->app;

isa_ok($app->plugin('ado_helpers'), 'Ado::Plugin::AdoHelpers');
my $plugin = $app->plugin('example', {lelemale => 1});

ok($app->plugins->namespaces->[-1] eq 'Ado::Plugin',
    '$app->plugins->namespaces->[-1]: ' . $app->plugins->namespaces->[-1]);
isnt($app->home,        $app->ado_home, '$app->home is not $app->ado_home');

t/plugin/example-01.t  view on Meta::CPAN

use File::Basename;
use File::Spec::Functions qw(catdir updir catfile);
use Cwd qw(abs_path);
use Test::More;

BEGIN {
    $ENV{MOJO_HOME} = abs_path(catdir(dirname(__FILE__), updir, 'ado'));
    $ENV{MOJO_CONFIG} = abs_path(catfile($ENV{MOJO_HOME}, '../../etc/ado.conf'));
    $ENV{MOJO_MODE} = 'alabala';
}
use lib("$ENV{MOJO_HOME}/lib");
use Test::Mojo;
my $t      = Test::Mojo->new('Ado');
my $app    = $t->app;
my $plugin = $app->plugin('example', {lelemale => 2});

is_deeply(
    $plugin->config,
    {   "a"        => 1,
        "bla"      => "uff",
        "lelemale" => 2,



( run in 0.264 second using v1.01-cache-2.11-cpan-87723dcf8b7 )