root/trunk/plagger/Makefile.PL

Revision 1206 (checked in by miyagawa, 14 years ago)
  • Now plugin dependencies are written in deps/Module-Name.yaml for DRY. Fixes #349
  • Updated Makefile.PL to read dependencies from deps/*.yaml
  • Added $t::TestPlagger?::BaseDir? and test_plugin_deps()
Line 
1 use strict;
2 use inc::Module::Install;
3
4 name('Plagger');
5 all_from('lib/Plagger.pm');
6
7 requires('Class::Accessor::Fast');
8 requires('File::Find::Rule');
9 requires('UNIVERSAL::require' => 0.10);
10 requires('Template', 2.13);
11 requires('Template::Provider::Encoding' => 0.04);
12 requires('YAML' => 0.39);
13 requires('Text::Tags');
14 requires('DateTime' => 0.29);
15 requires('DateTime::Format::Mail');
16 requires('DateTime::Format::W3CDTF');
17 requires('DateTime::Format::Strptime');
18 requires('Digest::MD5');
19 requires('LWP');
20 requires('HTML::Parser' => 3.48);
21 requires('URI::Fetch' => 0.071);
22 requires('Cache::Cache' => 1.04);
23 requires('Module::Pluggable::Fast');
24 requires('HTML::ResolveLink');
25 requires('Date::Parse');
26 requires('MIME::Types', 1.16);
27 requires('Net::DNS');
28
29 requires('XML::Feed', 0.09);
30 requires('XML::LibXML');
31 requires('XML::Atom', 0.19);
32 requires('XML::RSS::LibXML', 0.20);
33 requires('Encode', 2.10);
34 requires('Term::Encoding');
35
36 build_requires('YAML');
37 build_requires('Test::More', 0.42);
38 build_requires('Test::Base', 0.52);
39
40 features(
41     'Better Encoding detection' => [
42         -default => 1,
43         recommends('Encode::Detect'),
44     ],
45     'POD Testing' => [
46         -default => 0,
47         recommends('Test::Pod'),
48         recommends('Test::Pod::Coverage'),
49     ],
50     'Cookie sharing with Firefox' => [
51         -default => 0,
52         recommends('HTTP::Cookies::Mozilla'),
53     ],
54     'Liberal XML parsing' => [
55         -default => 1,
56         recommends('XML::Liberal', 0.13),
57         recommends('XML::RSS::Liberal'),
58     ],
59     'XPath support in Subscription and Feed Upgrader' => [
60         -default => 1,
61         recommends('HTML::TreeBuilder::XPath'),
62     ],
63 );
64
65 require YAML;
66 require DirHandle;
67 require File::Spec;
68
69 my $dh = DirHandle->new("deps");
70 while (my $f = $dh->read) {
71     next unless $f =~ /\.yaml$/;
72     my $meta = YAML::LoadFile( File::Spec->catfile("deps", $f) );
73
74     if (!$meta->{platform} || $meta->{platform} eq $^O) {
75         features(
76             $meta->{name}, [
77                 -default => $meta->{default},
78                 map recommends($_ => $meta->{depends}->{$_}), keys %{$meta->{depends}},
79             ],
80         );
81     }
82 }
83
84 tests 't/*.t t/*/*.t t/*/*/*.t';
85
86 use_test_base;
87
88 auto_include;
89 auto_install;
90 install_script('plagger');
91 install_script('bin/plagger-ircbot');
92 WriteAll;
Note: See TracBrowser for help on using the browser.