Leser: 21
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/usr/bin/perl -lw use strict; eval { require Class::Inspector; my $file = Class::Inspector->resolved_filename($ARGV[0]); unless ($file) { warn "not found\n"; exit (1); } print $file; exit (0); }; die unless 1 == @ARGV; eval "require $ARGV[0]"; my $file = $ARGV[0]; $file =~ s#::#/#g; $file .= '.pm'; print $INC{$file} || die "not found\n";