CPAN
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
* in CHECKSUM_check_file run configured gpg instead of hard-coded
"gpg" (Thanks to Tomas Hoger)
* tiny distroprefs maintenance
2021-12-26 k <andk@cpan.org>
* release 2.32-TRIAL
* Respect arguments to run() by localizing @ARGV (brian d foy)
* improve separation of test runs from each other
* remove dated distroprefs file
2021-12-14 k <andk@cpan.org>
* release 2.31-TRIAL
* replace short id with fingerprint (thanks to Stig Palmquist for
lib/App/Cpan.pm view on Meta::CPAN
The C<run> method returns 0 on success and a positive number on
failure. See the section on EXIT CODES for details on the values.
=cut
my $logger;
sub run
{
my( $class, @args ) = @_;
local @ARGV = @args;
my $return_value = HEY_IT_WORKED; # assume that things will work
$logger = $class->_init_logger;
$logger->debug( "Using logger from @{[ref $logger]}" );
$class->_hook_into_CPANpm_report;
$logger->debug( "Hooked into output" );
$class->_stupid_interface_hack_for_non_rtfmers;
$logger->debug( "Patched cargo culting" );
t/97-install_hack.t view on Meta::CPAN
@pairs = (
#before after
[ 'Nothing to nothing', [], [] ],
[ 'Starts with install, then nothing', [ qw(install) ], [qw(install)] ],
[ 'Starts with install, then module', [ qw(install Foo::Bar) ], [qw(Foo::Bar)] ],
[ 'Starts with -i, then install', [ qw(-i install) ], [ qw(-i install) ] ],
);
foreach my $pair ( @pairs ) {
local @ARGV = @{ $pair->[1] };
$class->$method;
is_deeply( \@ARGV, $pair->[2], $pair->[0] );
}
t/97-process_options.t view on Meta::CPAN
use_ok( $class );
can_ok( $class, $method );
require "./t/97-lib_cpan1/CPAN.pm";
}
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Test with no options
{
local @ARGV = ();
is( $class->$method(), 23, "No arguments calls shell branch" );
pass( "Got past the exit" );
}
t/97-process_setup_options.t view on Meta::CPAN
{
require "./t/97-lib_cpan1/CPAN.pm";
ok( defined &CPAN::shell, "Mock CPAN shell is defined" );
is( CPAN::shell(), 1, "Mock shell returns 1" );
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Test with no options
{
local @ARGV = ();
# not yet tested
}
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.518 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )