On 2003-02-14 09:19:04, bb@kisters.de wrote:
moin, wie kann ich erfragen welche Perl Module auf meinem Rechner installiert sind.
Ich habe mir dafür ein kleines Skript gebaut, was HTML ausspuckt... Ist nicht sehr sauber programmiert ;-) ist ne Ausgliederung aus einem größeren Projekt.... HTH Volker ----------------------%--------------%---------------------------- #!/usr/bin/perl -w print "Content-Type: text/html\n\n"; use strict; use Data::Dumper; use ExtUtils::Installed; use Config; my $perl = getPerlModules(); print $perl; sub getPerlModules { my $instmod = ExtUtils::Installed->new(); my $Modules; my $text = ""; foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || "???"; $Modules .= $module . "\t" . $version. "<br>\n"; } my $INC = '<b>Includepath</b> </td><td>' . shift(@INC) . "<br>"; foreach (@INC) { $INC .= "\t". $_." <br>\n"; } my $perladmin = `perl -V:perladmin`; $perladmin =~ s/[^=]+=(.*)/$1/; my $perlversion = `perl -V:version`; $perlversion =~ s/[^=]+=(.*)/$1/; my $path = `which perl`; my $confargs = `perl -V:config_args`; $confargs =~ s/[^=]+=(.*)/$1/; my $ccf = `perl -V:ccflags`; $ccf =~ s/[^=]+=(.*)/$1/; my $cc = `perl -V:cc`; $cc =~ s/[^=]+=(.*)/$1/; my $libs = `perl -V:libs`; $libs =~ s/[^=]+=(.*)/$1/; my $complete = `perl -V`; my $date = ""; my(@lines) = split(/\n/, $complete); foreach (@lines) { next unless $_ =~ /Compiled at/; $_ =~ s/Compiled at(.+)/$1/; $date = $_; last; } $text .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"; $text .= "<html>\n"; $text .= "<head>\n"; $text .= " <title>Service</title>\n"; $text .= " \n"; $text .= "