App-Sqitch

 view release on metacpan or  search on metacpan

inc/Module/Build/Sqitch.pm  view on Meta::CPAN

    my $dest = File::Spec->catfile($bin, 'sqitch');
    my $result = $self->copy_if_modified($script, $bin, 'flatten') or return;
    $self->fix_shebang_line($result) unless $self->is_vmsish;
    $self->_set_findbin($result);
    $self->make_executable($result);
}

sub _set_findbin {
    my ($self, $file) = @_;
    local $^I = '';
    local @ARGV = ($file);
    while (<>) {
        s{^BEGIN}{use FindBin;\nuse lib "\$FindBin::RealBin/../lib/perl5";\nBEGIN};
        print;
    }
}

t/base.t  view on Meta::CPAN

    chdir 't';

    my $config = TestConfig->from(
        local => 'sqitch.conf',
        user  => 'user.conf',
    );

    my $mocker = Test::MockModule->new('App::Sqitch::Config');
    $mocker->mock(new => $config);

    local @ARGV = qw(help config);
    is +App::Sqitch->go, 0, 'Should get 0 from go()';

    isa_ok $cmd, 'App::Sqitch::Command::help', 'Command';
    is_deeply \@params, ['config'], 'Extra args should be passed to execute';

    isa_ok my $sqitch = $cmd->sqitch, 'App::Sqitch';
    ok $config = $sqitch->config, 'Get the Sqitch config';
    is $config->get(key => 'engine.pg.client'), '/usr/local/pgsql/bin/psql',
        'Should have local config overriding user';
    is $config->get(key => 'engine.pg.registry'), 'meta',

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.119 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )