Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
periapt committed Sep 29, 2009
0 parents commit 966e20b
Show file tree
Hide file tree
Showing 15 changed files with 369 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Build.PL
@@ -0,0 +1,17 @@
use strict;
use warnings;
use Module::Build;

my $builder = Module::Build->new(
module_name => 'Geo::Google::MapObject',
license => 'perl',
dist_author => 'Nicholas Bamber <nicholas@periapt.co.uk>',
dist_version_from => 'lib/Geo/Google/MapObject.pm',
requires => {
'Test::More' => 0,
'version' => 0,
},
add_to_cleanup => [ 'Geo-Google-MapObject-*' ],
);

$builder->create_build_script();
5 changes: 5 additions & 0 deletions Changes
@@ -0,0 +1,5 @@
Revision history for Geo-Google-MapObject

0.01 Tue Sep 29 08:21:04 2009
Initial release.

14 changes: 14 additions & 0 deletions MANIFEST
@@ -0,0 +1,14 @@
Build.PL
Changes
MANIFEST
Makefile.PL
README
lib/Geo/Google/MapObject.pm
t/00.load.t
t/changes.t
t/manifest.t
t/perlcritic.t
t/perlcriticrc
t/pod-coverage.t
t/pod.t
t/podspell.t
17 changes: 17 additions & 0 deletions Makefile.PL
@@ -0,0 +1,17 @@
use strict;
use warnings;
use ExtUtils::MakeMaker;

WriteMakefile(
NAME => 'Geo::Google::MapObject',
AUTHOR => 'Nicholas Bamber <nicholas@periapt.co.uk>',
VERSION_FROM => 'lib/Geo/Google/MapObject.pm',
ABSTRACT_FROM => 'lib/Geo/Google/MapObject.pm',
PL_FILES => {},
PREREQ_PM => {
'Test::More' => 0,
},
LICENSE => 'perl',
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Geo-Google-MapObject-*' },
);
38 changes: 38 additions & 0 deletions README
@@ -0,0 +1,38 @@
Geo-Google-MapObject version 0.0.1

This module is intended to help with the server side of using the Google Maps API.
It is further intended to meet the following requirements.
* The solution must degrade gracefully from a javascript enabled environment to a javascript free environment.
* The solution must make as few assumptions about the surrounding framework as possible.
* The data should be concentrated in a single place.
* I don't like perl code that generates javascript or CSS. That seems messy and would prevent caching of what should be static resources.
* One assumption about the framework I will make is that we are using HTML::Template::Pluggable and HTML::Template::Plugin::Dot. It might work for some other templating frameworks but I will not look into that.

INSTALLATION

To install this module, run the following commands:

perl Makefile.PL
make
make test
make install

Alternatively, to install with Module::Build, you can use the following commands:

perl Build.PL
./Build
./Build test
./Build install


DEPENDENCIES

None.


COPYRIGHT AND LICENCE

Copyright (C) 2009, Nicholas Bamber

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
10 changes: 10 additions & 0 deletions ignore.txt
@@ -0,0 +1,10 @@
blib*
Makefile
Makefile.old
Build
_build*
pm_to_blib*
*.tar.gz
.lwpcookies
Geo-Google-MapObject-*
cover_db
167 changes: 167 additions & 0 deletions lib/Geo/Google/MapObject.pm
@@ -0,0 +1,167 @@
package Geo::Google::MapObject;

use warnings;
use strict;
use Carp;

=head1 NAME
Geo::Google::MapObject - [One line description of module's purpose here]
=head1 VERSION
Version 0.01
=cut

our $VERSION = '0.01';

=head1 SYNOPSIS
use Geo::Google::MapObject;
=for author to fill in:
Brief code example(s) here showing commonest usage(s).
This section will be as far as many users bother reading
so make it as educational and exeplary as possible.
=head1 DESCRIPTION
=for author to fill in:
Write a full description of the module and its features here.
Use subsections (=head2, =head3) as appropriate.
=head1 INTERFACE
=for author to fill in:
Write a separate section listing the public components of the modules
interface. These normally consist of either subroutines that may be
exported, or methods that may be called on objects belonging to the
classes provided by the module.
=cut

=head2 function1
=cut

sub function1 {
}

=head1 DIAGNOSTICS
=for author to fill in:
List every single error and warning message that the module can
generate (even the ones that will "never happen"), with a full
explanation of each problem, one or more likely causes, and any
suggested remedies.
=over
=item C<< Error message here, perhaps with %s placeholders >>
[Description of error here]
=item C<< Another error message here >>
[Description of error here]
[Et cetera, et cetera]
=back
=head1 CONFIGURATION AND ENVIRONMENT
=for author to fill in:
A full explanation of any configuration system(s) used by the
module, including the names and locations of any configuration
files, and the meaning of any environment variables or properties
that can be set. These descriptions must also include details of any
configuration language used.
Geo::Google::MapObject requires no configuration files or environment variables.
=head1 DEPENDENCIES
=for author to fill in:
A list of all the other modules that this module relies upon,
including any restrictions on versions, and an indication whether
the module is part of the standard Perl distribution, part of the
module's distribution, or must be installed separately. ]
None.
=head1 INCOMPATIBILITIES
=for author to fill in:
A list of any modules that this module cannot be used in conjunction
with. This may be due to name conflicts in the interface, or
competition for system or program resources, or due to internal
limitations of Perl (for example, many modules that use source code
filters are mutually incompatible).
None reported.
=head1 BUGS AND LIMITATIONS
=for author to fill in:
A list of known problems with the module, together with some
indication Whether they are likely to be fixed in an upcoming
release. Also a list of restrictions on the features the module
does provide: data types that cannot be handled, performance issues
and the circumstances in which they may arise, practical
limitations on the size of data sets, special cases that are not
(yet) handled, etc.
No bugs have been reported.
Please report any bugs or feature requests to
C<bug-geo-google-mapobject@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.
=head1 AUTHOR
Nicholas Bamber C<< <nicholas@periapt.co.uk> >>
=head1 LICENCE AND COPYRIGHT
Copyright (c) 2009, Nicholas Bamber C<< <nicholas@periapt.co.uk> >>. All rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.
=head1 DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
=cut

1; # End of Geo::Google::MapObject
7 changes: 7 additions & 0 deletions t/00.load.t
@@ -0,0 +1,7 @@
use Test::More tests => 1;

BEGIN {
use_ok( 'Geo::Google::MapObject' );
}

diag( "Testing Geo::Google::MapObject $Geo::Google::MapObject::VERSION" );
18 changes: 18 additions & 0 deletions t/changes.t
@@ -0,0 +1,18 @@
use strict;
use warnings;
use Test::More;

if ( not $ENV{TEST_AUTHOR} ) {
my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
plan( skip_all => $msg );
}

eval { require Test::CheckChanges; };

if ( $@ ) {
my $msg = 'Test::CheckChanges required to check Changes';
plan( skip_all => $msg );
}
Test::CheckChanges::ok_changes();


18 changes: 18 additions & 0 deletions t/manifest.t
@@ -0,0 +1,18 @@
use strict;
use warnings;
use Test::More;

if ( not $ENV{TEST_AUTHOR} ) {
my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
plan( skip_all => $msg );
}

eval { require Test::CheckManifest; };

if ( $@ ) {
my $msg = 'Test::CheckManifest required to check manifest';
plan( skip_all => $msg );
}

Test::CheckManifest::ok_manifest({filter=>[qr/\/\.git/,qr/\.bak$/,qr/\.old$/,qr/t\/dbfile$/,qr/\.tar\.gz$/]});

24 changes: 24 additions & 0 deletions t/perlcritic.t
@@ -0,0 +1,24 @@
use strict;
use warnings;
use File::Spec;
use Test::More;
use English qw(-no_match_vars);

if ( not $ENV{TEST_AUTHOR} ) {
my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
plan( skip_all => $msg );
}

eval { require Test::Perl::Critic; };

if ( $EVAL_ERROR ) {
my $msg = 'Test::Perl::Critic required to criticise code';
plan( skip_all => $msg );
}

my $rcfile = File::Spec->catfile( 't', 'perlcriticrc' );
#use Test::Perl::Critic;

Test::Perl::Critic->import( -profile => $rcfile );
all_critic_ok();

2 changes: 2 additions & 0 deletions t/perlcriticrc
@@ -0,0 +1,2 @@
severity = 1
exclude = Subroutines::ProhibitExplicitReturnUndef Subroutines::RequireArgUnpacking ClassHierarchies::ProhibitAutoloading RegularExpressions Miscellanea::RequireRcsKeywords Documentation::RequirePodAtEnd ControlStructures::ProhibitUnlessBlocks ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions ControlStructures::ProhibitPostfixControls Documentation::RequirePodSections References::ProhibitDoubleSigils Variables::ProhibitPunctuationVars ValuesAndExpressions::ProhibitInterpolationOfLiterals Subroutines::ProhibitManyArgs ValuesAndExpressions::ProhibitNoisyQuotes ValuesAndExpressions::ProhibitEmptyQuotes
6 changes: 6 additions & 0 deletions t/pod-coverage.t
@@ -0,0 +1,6 @@
#!perl -T

use Test::More;
eval "use Test::Pod::Coverage 1.04";
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
all_pod_coverage_ok();
6 changes: 6 additions & 0 deletions t/pod.t
@@ -0,0 +1,6 @@
#!perl -T

use Test::More;
eval "use Test::Pod 1.14";
plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
all_pod_files_ok();
20 changes: 20 additions & 0 deletions t/podspell.t
@@ -0,0 +1,20 @@
use strict;
use warnings;
use English qw(-no_match_vars);
use Test::More;

if ( not $ENV{TEST_AUTHOR} ) {
my $msg = 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
plan( skip_all => $msg );
}

eval { require Test::Spelling; };

if ( $EVAL_ERROR ) {
my $msg = 'Test::Spelling required to criticise code';
plan( skip_all => $msg );
}

Test::Spelling::add_stopwords(qw(CPAN Bamber AnnoCPAN RT internalId lang param HTML URLs href sitemap SQL bladger javascript loopName URL globalvars pageId pageid sitemaps XML changefreq en lastmod notfound pagelookup runmode runmodes url utf namespace upto stderr));
Test::Spelling::all_pod_files_spelling_ok();

0 comments on commit 966e20b

Please sign in to comment.