bin/cpan2tpkg in tpkg-1.18.2 vs bin/cpan2tpkg in tpkg-1.19.2
- old
+ new
@@ -27,10 +27,12 @@
Package version to use in tpkg, defaults to 1
[--extra-deps foo,1.0,1.9999,bar,4.5,4.5,blah,,,]
Extra dependencies to add to the package
[--native-deps foo,1.0,1.9999,bar,4.5,4.5,blah,,,]
Native dependencies to add to the package
+ [--force]
+ Force the install and packaging even if tests fail
[--help]
Show this message
All options can be shortened to anything that's unique.
EOF
@@ -40,17 +42,19 @@
my $pkgver = 1;
my %extradeps = ();
my $extradepsopts = '';
my %nativedeps = ();
my $nativedepsopts = '';
+my $force;
my $help;
my $getopt = GetOptions(
'version=s' => \$modver,
'package-version=s' => \$pkgver,
'extra-deps=s' => \$extradepsopts,
'native-deps=s' => \$nativedepsopts,
+ 'force' => \$force,
'help' => \$help);
my $module = shift @ARGV;
usage() if (!$getopt);
@@ -129,10 +133,17 @@
# FIXME: desired?
#CPAN::Shell->o('conf', 'prerequisites_policy', "ask");
# Install the module
-$modobj->install;
+if ($force)
+{
+ CPAN::Shell->force('install', $module);
+}
+else
+{
+ $modobj->install;
+}
# It is not nearly as straightforward as one might wish to get
# ExtUtils::Installed to inspect only a specified directory structure and not
# include system library directories. EU::I wants to look at a couple of
# system directories from $Config, any directories in the PERL5LIB environment