summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/do_pkgs.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index 05dbdb289..f49f6dcb4 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -29,6 +29,13 @@ sub ensure_is_installed {
1;
}
+sub ensure_is_installed_if_availlable {
+ my ($do, $pkg, $file) = @_;
+ if (! -e "$::prefix$file" && !$::testing) {
+ $do->{in}->do_pkgs->what_provides($pkg) and $do->{in}->do_pkgs->install($pkg);
+ }
+}
+
sub is_installed {
my ($do, $name) = @_;
$do->are_installed($name);