summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-11-26 18:19:18 +0100
committerDaniel Friesel <derf@finalrewind.org>2017-11-26 18:19:18 +0100
commitcbf05945f006c7cb039af76c876125ccfeffd00a (patch)
treebde7539d5ec63ab7a0517362e3350f644dd227f8
parent20c1141d0383f4cc4ac164fd154e89ca1e0cda47 (diff)
Add Build.PL and basic tests
-rw-r--r--.gitignore7
-rw-r--r--Build.PL28
-rwxr-xr-xt/01-compile-pl.t7
-rwxr-xr-xt/10-pod.t7
4 files changed, 49 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e9d5916
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+/Build
+/build/
+/_build/
+/blib/
+/cover_db/
+/MANIFEST*
+/MYMETA.*
diff --git a/Build.PL b/Build.PL
new file mode 100644
index 0000000..0c01d1a
--- /dev/null
+++ b/Build.PL
@@ -0,0 +1,28 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Module::Build;
+
+my $build = Module::Build->new(
+ build_requires => {
+ 'Test::Compile' => 0,
+ 'Test::Pod' => 0,
+ },
+ # Module::Build's automatic abstract inference from =head1 NAME -> "Foo - Bar"
+ # does not work for distributions whose name contains a - (dash). We
+ # therefore set the abstract manually.
+ dist_abstract => 'Publish multiple MQTT messages at once',
+ dist_name => 'mqtt-multipub',
+ dist_version_from => 'bin/mqtt-multipub',
+ license => 'perl',
+ requires => {
+ 'perl' => '5.20.0',
+ 'File::Slurp' => 0,
+ 'Getopt::Long' => 0,
+ 'Net::MQTT::Simple' => 0,
+ 'Time::HiRes' => 0,
+ },
+ sign => 1,
+);
+$build->create_build_script();
diff --git a/t/01-compile-pl.t b/t/01-compile-pl.t
new file mode 100755
index 0000000..92bff6e
--- /dev/null
+++ b/t/01-compile-pl.t
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+use Test::Compile;
+
+all_pl_files_ok();
diff --git a/t/10-pod.t b/t/10-pod.t
new file mode 100755
index 0000000..a488dfa
--- /dev/null
+++ b/t/10-pod.t
@@ -0,0 +1,7 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.010;
+use Test::Pod;
+
+all_pod_files_ok();