text stringlengths 0 834k |
|---|
my $o = $repo->{PerlO} || []; |
next if @$o && !grep $_ eq $^O, @$o; |
my $v = $repo->{PerlV} || []; |
my $my_v = ActivePerl::perl_version; |
next if @$v && !grep $my_v =~ /^\Q$_\E\b/, @$v; |
print ""\n"" if $count; |
print ""$PROGNAME repo add $id\n""; |
print "" $repo->{Notes}\n""; |
print "" $repo->{location}\n""; |
$count++; |
} |
} |
if ($count) { |
unless ($ppm_repo_ok) { |
print ""\n*** Install PPM-Repositories for more suggestions ***\n""; |
} |
} |
else { |
my $msg = ""No suggested repository for this perl""; |
$msg .= ""\nInstalling PPM-Repositories might provide some suggestions"" |
unless $ppm_repo_ok; |
die $msg; |
} |
} |
else { |
$cmd = _try_abbrev(""repo"", $cmd, qw(list location search sync on off delete describe add rename suggest)); |
goto AGAIN; |
} |
} |
sub do_info { |
my %info; |
$ppm->dbh; # so we can pick up db_file |
for (qw(arch etc db_file)) { |
$info{$_} = $ppm->{$_}; |
} |
$info{be_state} = $ppm->be_state; |
$info{be_serial} = web_ua()->be_serial || ""<none>""; |
$info{box_chars} = $BOX_CHARS || ""ascii""; |
$info{http_proxy} = $ENV{http_proxy} || ""<none>""; |
$info{log_file} = ActivePerl::PPM::Logger::ppm_logger()->logfile; |
{ |
no warnings 'once'; |
require FindBin; |
$info{ppm_path} = ""$FindBin::Bin/$FindBin::Script""; |
} |
require ActivePerl::PPM; |
$info{ppm_version} = $ActivePerl::PPM::VERSION; |
if (defined &ActivePerl::PRODUCT) { |
require ActivePerl; |
$info{perl} = ActivePerl::PRODUCT() . ""-"" . ActivePerl::perl_version(); |
} |
else { |
$info{perl} = ""perl-$^V""; |
} |
$info{perl_version} = $]; |
$info{perl_path} = $^X; |
if (@ARGV) { |
for my $k (@ARGV) { |
print ""$info{$k}\n""; |
} |
} |
else { |
for my $k (sort keys %info) { |
print ""$k = $info{$k}\n""; |
} |
} |
} |
sub print_be_info { |
my %opt = @_; |
$opt{prefix} = ""*** "" unless defined $opt{prefix}; |
if ($ppm->be_state eq ""expired"") { |
print ""$opt{prefix}Your ActivePerl Business Edition subscription seems to have expired.\n""; |
print ""$opt{prefix}Please visit your account at https://account.activestate.com to\n""; |
print ""$opt{prefix}renew your subscription.\n""; |
} |
else { |
print ""$opt{prefix}Please visit http://www.activestate.com/business_edition to learn more\n""; |
print ""$opt{prefix}about the ActivePerl Business Edition offering.\n""; |
} |
} |
sub do_search { |
$USAGE = ""search <pattern>""; |
my $sync = 1; |
require Getopt::Long; |
Getopt::Long::GetOptions( |
'sync!' => \$sync, |
) || usage(); |
usage() unless @ARGV == 1; |
my $pattern = shift(@ARGV); |
$ppm->repo_sync if $sync; |
my @fields = (""name"", ""version"", ""release_date"", ""abstract"", ""repo_id"", ""cannot_install""); |
my @res = $ppm->search($pattern, @fields); |
if (@res) { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.