Geo/Hashing/Source/Random.pm

filter: Statementstmt 100% 11 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 93.3% 14 / 15 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
get_djia
1.0
CRAP 1.0
« sample.pl ↑ Summary
1 #!/usr/bin/perl -w
2 #
3 # $Id: Random.pm 255 2008-06-21 03:48:46Z dan $
4 #
5  
6 package Geo::Hashing::Source::Random;
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 require Exporter;
11  
12 1 our @ISA = qw/Exporter/;
13 1 our @EXPORT = qw/get_djia/;
14  
15 =head1 NAME
16  
17 Geo::Hashing::Source::Random - Use random values instead of DJIA opening values
18  
19 =head1 SYNOPSIS
20  
21 use Geo::Hashing;
22 my $g = new Geo::Hashing(source => 'random');
23 printf "Today's random offset is at %.6f, %.6f.\n", $g->lat, $g->lon;
24  
25 =head1 DESCRIPTION
26  
27 See documentation of Geo::Hashing.
28  
29 =cut
30 3 ▶sub get_djia {
Subroutine get_djia: called CC=1 SCAR=0.0
Pod undocumented
31 3 return 10000 + int(100*rand(3000))/100;
32 }
33  
34 =head1 AUTHOR
35  
36 Dan Boger, E<lt>zigdon@gmail.comE<gt>
37  
38 =head1 COPYRIGHT AND LICENSE
39  
40 Copyright (C) 2008 by Dan Boger
41  
42 This library is free software; you can redistribute it and/or modify
43 it under the same terms as Perl itself, either Perl version 5.10.0 or,
44 at your option, any later version of Perl 5 you may have available.
45  
46 =cut
47 1 1;
« sample.pl ↑ Summary