diff --git a/Changes b/Changes new file mode 100644 index 0000000..fa513e6 --- /dev/null +++ b/Changes @@ -0,0 +1,33 @@ +Revision history for Perl extension Geo::Coordinates::DecimalDegrees. + +0.07 Tue 02 Jan 2007 10:31:20 PM EST + Added test for signature + + Changed copyright to 2007 + +0.06 Thu 28 Dec 2006 10:46:22 PM EST + Return sign of $decimal_degrees in decimal2dms() and + decimal2dm() to fix bug 22753 + + Added tests to decimal2dms() and decimal2dm() for + decimal_degrees between 0 and -1 + + Signed the module + +0.05 Sun 09 Oct 2005 11:27:00 PM EDT + Removed division in decimal2dms by converting the decimal part + to minutes instead of seconds + +0.04 Sat 21 Jun 2003 11:44:44 AM EDT + Added decimal2dm and dm2decimal to SYNOPSIS + +0.03 Sat 21 Jun 2003 10:30:14 AM EDT + Changed tests to avoid floating point roundoff errors on some platforms + +0.02 Wed 18 Jun 2003 03:56:54 PM EDT + Added dm2decimal and decimal2dm + Added Andy Lester's pod.t + +0.01 Sun 15 Jun 2003 11:05:40 PM EDT + Initial release + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..21fe88e --- /dev/null +++ b/INSTALL @@ -0,0 +1,9 @@ +INSTALLATION + +To install this module type the following: + + perl Makefile.PL + make + make test + make install + diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..21348b7 --- /dev/null +++ b/MANIFEST @@ -0,0 +1,9 @@ +Changes +DecimalDegrees.pm +INSTALL +Makefile.PL +MANIFEST +README +t/0-signature.t +t/1.t +t/pod.t diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP new file mode 100644 index 0000000..354a816 --- /dev/null +++ b/MANIFEST.SKIP @@ -0,0 +1,8 @@ +^MANIFEST\.bak$ +^MANIFEST\.SKIP$ +Makefile(\.old)?$ +\.rej$ +\.svn +blib +~ +\.tar.gz$ \ No newline at end of file diff --git a/Makefile.PL b/Makefile.PL new file mode 100644 index 0000000..8dde2a0 --- /dev/null +++ b/Makefile.PL @@ -0,0 +1,14 @@ +require 5.004; +use strict; +use ExtUtils::MakeMaker; +# See lib/ExtUtils/MakeMaker.pm for details of how to influence +# the contents of the Makefile that is written. +WriteMakefile( + (MM->can('signature_target') ? (SIGN => 1) : ()), + 'NAME' => 'Geo::Coordinates::DecimalDegrees', + 'VERSION_FROM' => 'DecimalDegrees.pm', # finds $VERSION + 'dist' => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, + ($] >= 5.005 ? ## Add these new keywords supported since 5.005 + (ABSTRACT_FROM => 'DecimalDegrees.pm', # retrieve abstract from module + AUTHOR => 'Walt Mankowski ') : ()), +); diff --git a/t/0-signature.t b/t/0-signature.t new file mode 100644 index 0000000..05f0617 --- /dev/null +++ b/t/0-signature.t @@ -0,0 +1,37 @@ +# Copied from the pod for Module::Signature +# +# $Id$ + +use strict; +use Test::More; + +if (!$ENV{TEST_SIGNATURE}) { + plan skip_all => + "Set the environment variable TEST_SIGNATURE to enable this test."; +} +elsif (!eval { require Module::Signature; 1 }) { + plan skip_all => + "Next time around, consider installing Module::Signature, ". + "so you can verify the integrity of this distribution."; +} +elsif ( !-e 'SIGNATURE' ) { + plan skip_all => "SIGNATURE not found"; +} +elsif ( -s 'SIGNATURE' == 0 ) { + plan skip_all => "SIGNATURE file empty"; +} +elsif (!eval { require Socket; Socket::inet_aton('pgp.mit.edu') }) { + plan skip_all => "Cannot connect to the keyserver to check module ". + "signature"; +} +else { + plan tests => 1; +} + +my $ret = Module::Signature::verify(); +SKIP: { + skip "Module::Signature cannot verify", 1 + if $ret eq Module::Signature::CANNOT_VERIFY(); + + cmp_ok $ret, '==', Module::Signature::SIGNATURE_OK(), "Valid signature"; +} diff --git a/t/pod.t b/t/pod.t new file mode 100644 index 0000000..bab9daf --- /dev/null +++ b/t/pod.t @@ -0,0 +1,24 @@ +# Copied from Andy Lester (http://use.perl.org/~petdance/journal/12391) +# This test validates the Pod in this module +# +# $Id$ + +use Test::More; +use File::Spec; +use File::Find; +use strict; + +eval "use Test::Pod 0.95"; + +if ($@) { + plan skip_all => "Test::Pod v0.95 required for testing POD"; +} else { + Test::Pod->import; + my @files; + my $blib = File::Spec->catfile(qw(blib lib)); + find( sub {push @files, $File::Find::name if /\.p(l|m|od)$/}, $blib); + plan tests => scalar @files; + foreach my $file (@files) { + pod_file_ok($file); + } +}