Geo-Constants-0.07/0000755000175000017500000000000014740562414013463 5ustar mdavismdavisGeo-Constants-0.07/Changes0000644000175000017500000000067314740561466014772 0ustar mdavismdavisRevision history for Perl module Geo::Constants 0.07 2025-01-11 - Moved from private repo to GitHub - Modernized package structure 0.06 2007-01-15 - Added KNOTS() function 0.05 2006-12-10 - Tweaked documentation 0.04 2006-12-08 - Changed from constants to subs 0.03 2006-12-03 - Added Req for Exporter 0.02 2006-12-03 - Added DEG() and RAD() - Renamed pi() to PI() - Documentation 0.01 2006-12-02 - Original version Geo-Constants-0.07/lib/0000755000175000017500000000000014740562414014231 5ustar mdavismdavisGeo-Constants-0.07/lib/Geo/0000755000175000017500000000000014740562414014743 5ustar mdavismdavisGeo-Constants-0.07/lib/Geo/Constants.pm0000644000175000017500000000407414740560013017253 0ustar mdavismdavispackage Geo::Constants; use strict; use warnings; use base qw{Exporter}; our $VERSION = '0.07'; our @EXPORT_OK = qw{PI DEG RAD KNOTS}; =head1 NAME Geo::Constants - Package for standard Geo:: constants. =head1 SYNOPSIS use Geo::Constants qw{PI DEG RAD}; #import into namespace print "PI: ", PI(), "\n"; print "d/r: ", DEG(), "\n"; print "r/d: ", RAD(), "\n"; use Geo::Constants; #Perl OO my $obj = Geo::Constants->new(); print "PI: ", $obj->PI, "\n"; print "d/r: ", $obj->DEG, "\n"; print "r/d: ", $obj->RAD, "\n"; =head1 DESCRIPTION =head1 CONSTRUCTOR =head2 new The new() constructor my $obj = Geo::Constants->new(); =cut sub new { my $this = shift; my $class = ref($this) ? ref($this) : $this; my $self = {}; bless $self, $class; $self->initialize(@_); return $self; } =head2 initialize =cut sub initialize { my $self=shift; %$self=@_; } =head1 FUNCTIONS =head2 PI my $pi = $obj->PI; use Geo::Constants qw{PI}; my $pi = PI(); =cut sub PI { return 4 * atan2(1,1); #Perl should complile this as a constant } =head2 DEG my $degrees_per_radian = $obj->DEG; use Geo::Constants qw{DEG}; my $degrees_per_radian = DEG(); UOM: degrees/radian =cut sub DEG { return 180 / PI(); #Degrees per radian } =head2 RAD my $radians_per_degree = $obj->RAD; use Geo::Constants qw{DEG}; my $radians_per_degree = RAD(); UOM: radians/degree =cut sub RAD { return PI() / 180; #Radians per degree } =head2 KNOTS 1 nautical mile per hour = (1852/3600) m/s - United States Department of Commerce, National Institute of Standards and Technology, NIST Special Publication 330, 2001 Edition Returns 1852/3600 m/s/knot UOM: meters/second per knot =cut sub KNOTS { return 1852/3600; #1 nautical mile per hour = (1852/3600) m/s } =head1 AUTHOR Michael R. Davis =head1 LICENSE Copyright (c) 2006-2025 Michael R. Davis This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L, L, L =cut 1; Geo-Constants-0.07/MANIFEST0000644000175000017500000000041514740562414014614 0ustar mdavismdavisChanges lib/Geo/Constants.pm LICENSE Makefile.PL MANIFEST README.md t/base.t perl-Geo-Constants.spec META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) Geo-Constants-0.07/README.md0000644000175000017500000000300514740562357014746 0ustar mdavismdavis# NAME Geo::Constants - Package for standard Geo:: constants. # SYNOPSIS use Geo::Constants qw{PI DEG RAD}; #import into namespace print "PI: ", PI(), "\n"; print "d/r: ", DEG(), "\n"; print "r/d: ", RAD(), "\n"; use Geo::Constants; #Perl OO my $obj = Geo::Constants->new(); print "PI: ", $obj->PI, "\n"; print "d/r: ", $obj->DEG, "\n"; print "r/d: ", $obj->RAD, "\n"; # DESCRIPTION # CONSTRUCTOR ## new The new() constructor my $obj = Geo::Constants->new(); ## initialize # FUNCTIONS ## PI my $pi = $obj->PI; use Geo::Constants qw{PI}; my $pi = PI(); ## DEG my $degrees_per_radian = $obj->DEG; use Geo::Constants qw{DEG}; my $degrees_per_radian = DEG(); UOM: degrees/radian ## RAD my $radians_per_degree = $obj->RAD; use Geo::Constants qw{DEG}; my $radians_per_degree = RAD(); UOM: radians/degree ## KNOTS 1 nautical mile per hour = (1852/3600) m/s - United States Department of Commerce, National Institute of Standards and Technology, NIST Special Publication 330, 2001 Edition Returns 1852/3600 m/s/knot UOM: meters/second per knot # AUTHOR Michael R. Davis # LICENSE Copyright (c) 2006-2025 Michael R. Davis This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. # SEE ALSO [Geo::Functions](https://metacpan.org/pod/Geo::Functions), [Geo::Ellipsoids](https://metacpan.org/pod/Geo::Ellipsoids), [Astro::Constants](https://metacpan.org/pod/Astro::Constants) Geo-Constants-0.07/perl-Geo-Constants.spec0000644000175000017500000000242614740560001017755 0ustar mdavismdavisName: perl-Geo-Constants Version: 0.07 Release: 1%{?dist} Summary: Package for standard Geo:: constants License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Geo-Constants/ Source0: http://www.cpan.org/modules/by-module/Geo/Geo-Constants-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Exporter) BuildRequires: perl(ExtUtils::MakeMaker) Requires: perl(Exporter) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description CONSTRUCTOR %prep %setup -q -n Geo-Constants-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %check make test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes LICENSE README.md %{perl_vendorlib}/* %{_mandir}/man3/* %changelog * Sat Jan 11 2025 Michael R. Davis 0.06-1 - Specfile autogenerated by cpanspec 1.78. Geo-Constants-0.07/t/0000755000175000017500000000000014740562414013726 5ustar mdavismdavisGeo-Constants-0.07/t/base.t0000644000175000017500000000132314740562261015024 0ustar mdavismdavis#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 14; use_ok('Geo::Constants'); { my $o = Geo::Constants->new(); isa_ok($o, 'Geo::Constants'); can_ok($o, 'PI'); can_ok($o, 'DEG'); can_ok($o, 'RAD'); can_ok($o, 'KNOTS'); is($o->PI , 4*atan2(1,1) , '->PI' ); is($o->DEG , 180/(4*atan2(1,1)), '->DEG' ); is($o->RAD , 4*atan2(1,1)/180 , '->RAD' ); is($o->KNOTS, 1852/3600 , '->KNOTS' ); } { use Geo::Constants qw{PI DEG RAD KNOTS}; is(PI() , 4*atan2(1,1) , 'exported PI()' ); is(DEG() , 180/(4*atan2(1,1)), 'exported DEG()' ); is(RAD() , 4*atan2(1,1)/180 , 'exported RAD()' ); is(KNOTS(), 1852/3600 , 'exported KNOTS()' ); } Geo-Constants-0.07/LICENSE0000644000175000017500000000026014051753707014470 0ustar mdavismdavisCopyright (c) 2006 Michael R. Davis (mrdvt92) All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Geo-Constants-0.07/Makefile.PL0000644000175000017500000000143314740561005015431 0ustar mdavismdavisuse ExtUtils::MakeMaker; WriteMakefile( NAME => 'Geo::Constants', VERSION_FROM => 'lib/Geo/Constants.pm', ABSTRACT_FROM => 'lib/Geo/Constants.pm', LICENSE => 'perl', PREREQ_PM => { 'Exporter' => 0, 'Test::Simple' => 0.44, #Tests }, 'META_MERGE' => { 'resources' => { 'repository' => { 'web' => 'https://github.com/mrdvt92/perl-Geo-Constants.git', 'url' => 'git@github.com:mrdvt92/perl-Geo-Constants.git', 'type' => 'git' }, 'homepage' => 'https://github.com/mrdvt92/perl-Geo-Constants', 'bugtracker' => { 'web' => 'https://github.com/mrdvt92/perl-Geo-Constants/issues' } }, 'meta-spec' => { 'version' => 2 } }, ); Geo-Constants-0.07/META.yml0000664000175000017500000000127614740562414014744 0ustar mdavismdavis--- abstract: 'Package for standard Geo:: constants.' author: - unknown build_requires: ExtUtils::MakeMaker: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.52, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Geo-Constants no_index: directory: - t - inc requires: Exporter: '0' Test::Simple: '0.44' resources: bugtracker: https://github.com/mrdvt92/perl-Geo-Constants/issues homepage: https://github.com/mrdvt92/perl-Geo-Constants repository: https://github.com/mrdvt92/perl-Geo-Constants.git version: '0.07' Geo-Constants-0.07/META.json0000664000175000017500000000230214740562414015103 0ustar mdavismdavis{ "abstract" : "Package for standard Geo:: constants.", "author" : [ "unknown" ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.52, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Geo-Constants", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "runtime" : { "requires" : { "Exporter" : "0", "Test::Simple" : "0.44" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/mrdvt92/perl-Geo-Constants/issues" }, "homepage" : "https://github.com/mrdvt92/perl-Geo-Constants", "repository" : { "type" : "git", "web" : "https://github.com/mrdvt92/perl-Geo-Constants.git" } }, "version" : "0.07" }