-
Notifications
You must be signed in to change notification settings - Fork 11
/
Build.PL
50 lines (46 loc) · 1.51 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
use strict;
use warnings;
use Module::Build;
shift(@ARGV) if defined $ARGV[0] and $ARGV[0] eq 'Build'; # accomodate with CPAN autoinstall
my $builder = Module::Build->new(
module_name => 'Net::OAuth',
license => 'perl',
dist_author => [ 'Keith Grennan <[email protected]>', 'Robert Rothenberg <[email protected]>' ],
dist_version_from => 'lib/Net/OAuth.pm',
dist_abstract => 'An implementation of the OAuth protocol',
build_requires => {
'Test::More' => '0.66',
'Test::Warn' => '0.21',
},
requires => {
'Digest::SHA' => '5.47',
'Digest::HMAC_SHA1' => '1.01',
'URI' => '5.15',
'Class::Accessor' => '0.31',
'Class::Data::Inheritable' => '0.06',
'Encode' => '2.35',
'LWP::UserAgent' => '1',
},
config_requires => {
'Module::Build::Compat' => '0.4234',
},
add_to_cleanup => [ 'Net-OAuth-*' ],
create_makefile_pl => 'small',
meta_merge => {
resources => {
bugtracker => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Net-OAuth',
repository => 'https://github.com/keeth/Net-OAuth.git',
},
},
);
$builder->create_build_script();
__END__
# handy lister of installed dependency versions
use Data::Dumper;
my $requires = $builder->build_requires;
for my $mod (keys %$requires) {
eval "require $mod";
$requires->{$mod} = eval "\$$mod\::VERSION";
}
print "Current dependency versions:\n";
print Dumper $requires;