-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.PL
executable file
·35 lines (32 loc) · 1.16 KB
/
Build.PL
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
#
# $Id: Build.PL,v 1.2 2008/07/09 22:14:17 mprewitt Exp mprewitt $
#
use strict;
use warnings;
use Module::Build;
#use Getopt::Long;
use File::Copy;
my $build = Module::Build->new(
module_name => 'File::SmartTail',
license => 'perl',
dist_author => 'DMJA, Inc <[email protected]>',
dist_abstract => 'Local and Remote Tail Library',
dist_version_from => 'lib/File/SmartTail/Version.pm',
script_files => ['rtail.pl'],
auto_features => {
log4perl_support => {
description => "Log4perl logging",
requires => { 'Log::Log4perl' => 0 },
},
},
);
print STDERR "Setting up default logger...\n";
unlink('lib/File/SmartTail/Logger.pm') if -f 'lib/File/SmartTail/Logger.pm';
if ($build->feature('log4perl_support') || $build->args('log4perl')) {
copy("lib/File/SmartTail/Log4perlLogger.pm","lib/File/SmartTail/Logger.pm");
print STDERR " Using log4perl logger\n";
} else {
copy("lib/File/SmartTail/NullLogger.pm","lib/File/SmartTail/Logger.pm");
print STDERR " Using null logger, run perl Build.PL --log4perl=1 to use log4perl...\n";
}
$build->create_build_script;