Thread Modul require aber wie? (16 answers)
Opened by bianca at 2009-10-10 16:41

pq
 2009-10-10 16:45
#126848 #126848
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
my $ftp;
BEGIN {
  eval {
    require Foo;
  }; # oder eval "use Foo"
  $ftp = 1 unless $@;
}

if ($ftp) {
}
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Modul require aber wie?