Thread ExtUtils::Installed findet nicht alle Module? (37 answers)
Opened by bianca at 2012-10-24 11:39

bianca
 2012-10-24 11:57
#162780 #162780
User since
2009-09-13
6978 Artikel
BenutzerIn

user image
2012-10-24T09:49:55 renee
ExtUtils::Installed arbeitet - soweit ich weiß - mit den Dateien ".packlist". Die werden aber nicht bei jeder Installationsmethode auch geschrieben. Hast Du manche Module mit apt-get, yum oder so installiert? Dann existieren diese Dateien glaube ich nicht.

Achso.
Es ist Windows und ich installiere die Module entweder per cpan Eingabeaufforderung oder per perl -MCPAN -e shell
Wie ich dieses installiert hatte, weiß ich nicht mehr.

Bin jetzt auf einer Vista Kiste und lasse folgendes Script laufen:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
use strict;
use warnings;

use 5.008;
use strict;
use warnings;

use HTTP::Message;
use LWP::UserAgent;

my $url        = 'http://labs.gwendragon.de/';
my $ua         = LWP::UserAgent->new;
my $can_accept = HTTP::Message::decodable;

my $response = $ua->get( $url, 'Accept-Encoding' => $can_accept, );
print $response->{_headers}->as_string;

print "\nModultest: '";
eval 'use ExtUtils::Installed; $inst = ExtUtils::Installed->new(); @modules = $inst->modules(extra_libs=>\@{"cgi-bin/lib"}); /(HTTP::Message)/ && print "$1 found" for (@modules)';
print "'\n";

Bringt diese Ausgabe:
Quote
C:\Arbeit\temp>perl test.pl
Cache-Control: max-age=7200
Connection: close
Date: Wed, 24 Oct 2012 09:54:55 GMT
Accept-Ranges: bytes
ETag: "1c8a880-a09-4bbc1209bb440"
Server: Apache
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 1038
Content-Type: text/html
Expires: Wed, 24 Oct 2012 11:54:55 GMT
Last-Modified: Wed, 21 Mar 2012 13:54:17 GMT
Client-Date: Wed, 24 Oct 2012 09:54:42 GMT
Client-Peer: 213.133.110.246:80
Client-Response-Num: 1
X-Frame-Options: SAMEORIGIN
X-LoadTime: D=744
X-Powered-By: Perl

Modultest: ''

Module sind also offensichtlich vorhanden, HTTP::Message wird dennoch nicht als vorhanden angezeigt.
10 print "Hallo"
20 goto 10

View full thread ExtUtils::Installed findet nicht alle Module?