-
Notifications
You must be signed in to change notification settings - Fork 4
/
MyInstall.pm
43 lines (31 loc) · 1013 Bytes
/
MyInstall.pm
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
32
33
34
35
36
37
38
39
40
41
42
package MyInstall;
use ExtUtils::Install;
use File::Find;
use vars qw (@ISA @EXPORT @EXPORT_OK);
@ISA = @ExtUtils::Install::ISA;
@EXPORT = @ExtUtils::Install::EXPORT;
@EXPORT_OK = @ExtUtils::Install::EXPORT_OK;
sub ExtUtils::Install::directory_not_empty ($) {
my($dir) = @_;
return 0 if $dir eq 'blib/arch';
my $files = 0;
find(sub {
return if $_ eq ".exists";
if (-f) {
$File::Find::prune++;
$files = 1;
}
}, $dir);
return $files;
}
sub AUTOLOAD
{
print STDERR "AUTOLOAD: $AUTOLOAD\n";
my $name = 'func';
my $code;
my $string = "\$code = \\&ExtUtils::Install::$name";
eval $string;
*$AUTOLOAD = $code;
goto &$AUTOLOAD;
}
1;