Permalink
Browse files

Use Dist::Zilla

  • Loading branch information...
1 parent 7e294f7 commit ca4776c662d6523c704dce335deceeac041b95d4 @abh committed Aug 2, 2010
Showing with 104 additions and 204 deletions.
  1. +11 −4 .gitignore
  2. +3 −0 Changes
  3. +0 −12 MANIFEST
  4. +46 −0 MANIFEST.SKIP
  5. +0 −17 META.yml
  6. +0 −22 Makefile.PL
  7. +0 −146 README
  8. +43 −0 dist.ini
  9. +1 −3 lib/Geo/Coder/Yahoo.pm
View
@@ -1,6 +1,13 @@
-*~
+blib*
Makefile
Makefile.old
-blib/
-pm_to_blib
-cover_db/
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+Geo-Coder-Yahoo-*
+cover_db
+*~
+*.bak
+.build
View
@@ -1,5 +1,8 @@
Revision history for Geo-Coder-Yahoo
+{{$NEXT}}
+ - Add ua method as attribute accessor (Tim Bunce)
+
0.45 2010/06/14
- Require Yahoo::Search::XML 20100612 (Yahoo::Search 1.11.3)
which fixes utf8-encoding.
View
@@ -1,12 +0,0 @@
-Changes
-MANIFEST
-META.yml # Will be created by "make dist"
-Makefile.PL
-README
-lib/Geo/Coder/Yahoo.pm
-t/00-load.t
-t/boilerplate.t
-t/pod-coverage.t
-t/pod.t
-t/simple.t
-t/Subclass.pm
View
@@ -0,0 +1,46 @@
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+\bSCCS\b
+,v$
+\B\.svn\b
+\B\.git\b
+\b_darcs\b
+
+# Avoid Makemaker generated and utility files.
+\bMANIFEST\.bak
+\bMakefile$
+\bblib/
+\bMakeMaker-\d
+\bpm_to_blib\.ts$
+\bpm_to_blib$
+\bblibdirs\.ts$ # 6.18 through 6.25 generated this
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\b_build/
+
+# Avoid temp and backup files.
+~$
+\.old$
+\#$
+\b\.#
+\.bak$
+
+# Avoid Devel::Cover files.
+\bcover_db\b
+
+### DEFAULT MANIFEST.SKIP ENDS HERE ####
+
+t/tmp/ctpl
+
+\.DS_Store$
+\.sw.$
+(\w+-)*(\w+)-\d\.\d+(?:\.tar\.gz)?$
+
+\.t\.log$
+
+\.prove$
+
+# XS shit
+\.(?:bs|c|o)$
View
@@ -1,17 +0,0 @@
---- #YAML:1.0
-name: Geo-Coder-Yahoo
-version: 0.03_51
-abstract: Geocode addresses with the Yahoo! API
-license: perl
-author:
- - Ask Bjoern Hansen <ask@develooper.com>
-generated_by: ExtUtils::MakeMaker version 6.44
-distribution_type: module
-requires:
- LWP::UserAgent: 0
- Test::More: 0
- URI: 0
- Yahoo::Search::XML: 20060729.004
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
View
@@ -1,22 +0,0 @@
-
-use strict;
-use warnings;
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
- NAME => 'Geo::Coder::Yahoo',
- AUTHOR => 'Ask Bjoern Hansen <ask@develooper.com>',
- VERSION_FROM => 'lib/Geo/Coder/Yahoo.pm',
- ABSTRACT_FROM => 'lib/Geo/Coder/Yahoo.pm',
- PL_FILES => {},
- LICENSE => 'perl',
- PREREQ_PM => {
- 'Test::More' => 0,
- 'Yahoo::Search::XML' => '20060729.004',
- 'LWP::UserAgent' => 0,
- 'URI' => 1.36,
- 'Encode' => 0,
- },
- dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
- clean => { FILES => 'Geo-Coder-Yahoo-*' },
-);
View
@@ -1,146 +0,0 @@
-NAME
- Geo::Coder::Yahoo - Geocode addresses with the Yahoo! API
-
-SYNOPSIS
- Provides a thin Perl interface to the Yahoo! Geocoding API.
-
- use Geo::Coder::Yahoo;
-
- my $geocoder = Geo::Coder::Yahoo->new(appid => 'my_app' );
- my $location = $geocoder->geocode( location => 'Hollywood and Highland, Los Angeles, CA' );
-
-OFFICIAL API DOCUMENTATION
- Read more about the API at
- <http://developer.yahoo.net/maps/rest/V1/geocode.html>.
-
-PROXY SETTINGS
- We use the standard proxy setting environment variables via LWP. See the
- LWP documentation for more information.
-
-METHODS
- new
- Geo::Coder::Yahoo->new(appid => $appid)
- Geo::Coder::Yahoo->new(appid => $appid, on_error => sub { ... })
-
- Instantiates a new object.
-
- appid specifies your Yahoo Application ID. You can register at
- <http://api.search.yahoo.com/webservices/register_application>.
-
- If you don't specify it here you must specify it when calling geocode.
-
- on_error specifies an error handler to be called if the HTTP response
- code does not indicate success. The subroutine is called with the
- geocode object as the first argument and the HTTP::Response object as
- the second. The return value from the subroutine is used as the return
- value from "geocode".
-
- geocode( location => $location )
- Parameters are the URI arguments documented on the Yahoo API page
- (location, street, city, state, zip). You usually just need one of them
- to get results.
-
- "geocode" returns a reference to an array of results (an arrayref). More
- than one result may be returned if the given address is ambiguous.
-
- Each result in the arrayref is a hashref with data like the following
- example:
-
- {
- 'country' => 'US',
- 'longitude' => '-118.3387',
- 'state' => 'CA',
- 'zip' => '90028',
- 'city' => 'LOS ANGELES',
- 'latitude' => '34.1016',
- 'warning' => 'The exact location could not be found, here is the closest match: Hollywood Blvd At N Highland Ave, Los Angeles, CA 90028',
- 'address' => 'HOLLYWOOD BLVD AT N HIGHLAND AVE',
- 'precision' => 'address'
- }
-
- precision
- The precision of the address used for geocoding, from specific
- street address all the way up to country, depending on the precision
- of the address that could be extracted. Possible values, from most
- specific to most general are:
-
- address
- street
- zip+4
- zip+2
- zip
- city
- state
- country
-
- warning
- If the exact address was not found, the closest available match will
- be noted here.
-
- latitude
- The latitude of the location.
-
- longitude
- The longitude of the location.
-
- address
- Street address of the result, if a specific location could be
- determined.
-
- city
- City in which the result is located.
-
- state
- State in which the result is located.
-
- zip Zip code, if known.
-
- country
- Country in which the result is located.
-
-AUTHOR
- Ask Bjørn Hansen, "<ask at develooper.com>"
-
-BUGS
- Please report any bugs or feature requests to "bug-geo-coder-yahoo at
- rt.cpan.org", or through the web interface at
- <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geo-Coder-Yahoo>. I will
- be notified, and then you'll automatically be notified of progress on
- your bug as I make changes.
-
-SUPPORT
- You can find documentation for this module with the perldoc command.
-
- perldoc Geo::Coder::Yahoo
-
- You can also look for information at:
-
- * Git Repository
-
- The latest code is available from the git repository at
- <git://git.develooper.com/Geo-Coder-Yahoo.git>. You can browse it at
- <http://git.develooper.com/?p=Geo-Coder-Yahoo.git;a=summary>.
-
- It is also at <http://github.com/abh/geo-coder-yahoo/tree/master>.
-
- * CPAN Ratings
-
- <http://cpanratings.perl.org/d/Geo-Coder-Yahoo>
-
- * RT: CPAN's request tracker
-
- <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Geo-Coder-Yahoo>
-
- * Search CPAN
-
- <http://search.cpan.org/dist/Geo-Coder-Yahoo>
-
-ACKNOWLEDGEMENTS
- Thanks to Yahoo for providing this free API.
-
-COPYRIGHT & LICENSE
- Copyright 2005-2010 Ask Bjoern Hansen, all rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the same terms as Perl itself.
-
View
@@ -0,0 +1,43 @@
+name = Geo-Coder-Yahoo
+author = Ask Bjørn Hansen <ask@develooper.com>
+license = Perl_5
+
+copyright_holder = Ask Bjørn Hansen
+# copyright_year = 2005-2010
+
+[Prereqs]
+Yahoo::Search::XML = 20060729.004
+LWP::UserAgent = 0
+URI = 1.36
+Encode = 0
+
+[Prereqs / TestRequires ]
+Test::More = 0
+
+[@Git]
+# push_to = all
+
+[@Filter]
+bundle = @Basic
+remove = Readme
+remove = Manifest
+
+[Repository]
+[Homepage]
+
+[BumpVersionFromGit]
+
+[PkgVersion]
+
+[CheckChangeLog]
+[CompileTests]
+[DistManifestTests]
+[HasVersionTests]
+[MetaTests]
+[ReadmeFromPod]
+[PodCoverageTests]
+[Manifest]
+
+[NextRelease]
+format = %-7v %{MMMM d, yyyy}d
+
@@ -10,8 +10,6 @@ use URI::QueryParam;
use LWP::UserAgent;
use Yahoo::Search::XML 20100612;
-our $VERSION = '0.45';
-
sub ua {
my $self = shift;
$self->{ua} = shift if @_;
@@ -26,7 +24,7 @@ sub new {
on_error => $args{on_error} || sub { undef },
ua => $args{ua} || do {
my $ua = LWP::UserAgent->new;
- $ua->agent(__PACKAGE__ . '/' . $VERSION);
+ $ua->agent(__PACKAGE__ . '/' . ($Geo::Coder::Yahoo::VERSION || 'git'));
$ua->env_proxy;
$ua;
},

0 comments on commit ca4776c

Please sign in to comment.