Leser: 1
10 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#!/usr/bin/perl use strict; use warnings; use diagnostics; use File::Find; use CGI::Carp qw(fatalsToBrowser); my $installed = ""; find ( sub { push (my @files, my $File::Find::name) if /\.pm$/; }, @INC); foreach my $i (@files){ my $absolut = $i; foreach my $a (@INC){ if(-e("$a") && $a ne "."){ $i =~ s/$a//gi; } } $i =~ s/^\///g; $i =~ s/\//::/g; $installed .= qq~Modul: $i, absoluter Pfad: $absolut<br>~; } print "Content-type: text/html\n\n"; print $installed; exit;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use File::Find ();
foreach my $root (@INC) {
&File::Find::find(
sub {
return unless /\.pm/;
my $module = $File::Find::name;
$module =~ s/^\Q$root\E\/(.+)\.pm/$1/
and $module =~ s/[\/\\]/::/g
and print $module. "\n";
},
$root
);
} # foreach
10 Einträge, 1 Seite |