Geo::Hashing::Source::Random - Use random values instead of DJIA opening values


Geo-Hashing documentation Contained in the Geo-Hashing distribution.

Index


Code Index:

NAME

Top

Geo::Hashing::Source::Random - Use random values instead of DJIA opening values

SYNOPSIS

Top

  use Geo::Hashing;
  my $g = new Geo::Hashing(source => 'random');
  printf "Today's random offset is at %.6f, %.6f.\n", $g->lat, $g->lon;

DESCRIPTION

Top

  See documentation of Geo::Hashing.

AUTHOR

Top

Dan Boger, <zigdon@gmail.com>

COPYRIGHT AND LICENSE

Top


Geo-Hashing documentation Contained in the Geo-Hashing distribution.
#!/usr/bin/perl -w
#
# $Id: Random.pm 255 2008-06-21 03:48:46Z dan $
#

package Geo::Hashing::Source::Random;

use strict;
use warnings;
require Exporter;

our @ISA = qw/Exporter/;
our @EXPORT = qw/get_djia/;

sub get_djia {
  return 10000 + int(100*rand(3000))/100;
}

1;