From ab171d056a160dd16174316c5cbf84c9059ad712 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 19 Dec 2010 12:48:07 +0100 Subject: Add Build.PL + basic tests --- .gitignore | 3 +++ Build.PL | 27 +++++++++++++++++++++++++++ bin/hashl | 2 ++ t/00-compile.t | 8 ++++++++ t/10-pod-coverage.t | 8 ++++++++ 5 files changed, 48 insertions(+) create mode 100644 .gitignore create mode 100644 Build.PL create mode 100755 t/00-compile.t create mode 100755 t/10-pod-coverage.t diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..201c581 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/_build +/Build +/blib diff --git a/Build.PL b/Build.PL new file mode 100644 index 0000000..d3f575c --- /dev/null +++ b/Build.PL @@ -0,0 +1,27 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Module::Build; + +my $build = Module::Build->new( + build_requires => { + 'Test::More' => 0, + 'Test::Compile' => 0, + 'Test::Pod' => 0, + }, + dist_name => 'hashl', + dist_version_from => 'bin/hashl', + license => 'unrestricted', + requires => { + 'perl' => '5.10.0', + 'autodie' => 0, + 'Digest::SHA' => 0, + 'File::Find' => 0, + 'Getopt::Long' => 0, + 'Storable' => 0, + 'Time::Progress' => 0, + }, + script_files => 'bin/', +); +$build->create_build_script(); diff --git a/bin/hashl b/bin/hashl index a786635..dd80151 100755 --- a/bin/hashl +++ b/bin/hashl @@ -22,6 +22,8 @@ my $total = 0; my $cur = 0; my $timer; +my $VERSION = '0.1'; + my $db; GetOptions( diff --git a/t/00-compile.t b/t/00-compile.t new file mode 100755 index 0000000..0b0ce37 --- /dev/null +++ b/t/00-compile.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Compile; + +all_pl_files_ok('bin/hashl'); diff --git a/t/10-pod-coverage.t b/t/10-pod-coverage.t new file mode 100755 index 0000000..7def222 --- /dev/null +++ b/t/10-pod-coverage.t @@ -0,0 +1,8 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use 5.010; +use Test::More; +use Test::Pod; + +all_pod_files_ok('bin/hashl'); -- cgit v1.2.3