Debian Codegraph @

inc/bad-forks.pl

raw
1 use strict;
2 use warnings;
3 use File::Spec;
4
5 my $path;
6 foreach my $inc (@INC)
7 {
8 $path = File::Spec->catfile($inc, 'forks.pm');
9 last if -f $path;
10 }
11
12 if(-f $path)
13 {
14 eval q{ use forks };
15 if(my $error = $@)
16 {
17 print "There seems to be something wrong with your forks.pm module.\n";
18 print "This exception was raised when trying to use forks:\n\n";
19
20 print " $error\n\n";
21
22 print "Although forks.pm is not required by FFI-Platypus, it does test\n";
23 print "against forks.pm if it is installed, so please fix your forks.pm\n";
24 print "before trying to install FFI-Platypus.\n\n";
25
26 print "If you believe this to be an error in FFI-Platypus, please feel\n";
27 print "free to open a ticket here:\n\n";
28
29 print "https://github.com/PerlFFI/FFI-Platypus/issues\n\n";
30 exit 2;
31 }
32 }