Skip to content

Commit

Permalink
Modernized distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
hma committed Sep 23, 2010
1 parent 54fb277 commit 58d9e08
Show file tree
Hide file tree
Showing 28 changed files with 782 additions and 147 deletions.
6 changes: 5 additions & 1 deletion Changes
@@ -1,4 +1,8 @@
Revision history for Perl extension WebService::Google::Language
Revision history for Perl extension WebService-Google-Language

0.11_01 Sep 23, 2010

- Modernized distribution (no functional changes)

0.10 Dec 14, 2009

Expand Down
12 changes: 8 additions & 4 deletions MANIFEST
@@ -1,12 +1,16 @@
Changes
lib/WebService/Google/Language.pm
Makefile.PL
MANIFEST
META.yml
Makefile.PL
README
lib/WebService/Google/Language.pm
t/00-load.t
t/01-constructor.t
t/02-accessors.t
t/03-methods.t
t/04-pod.t
t/05-pod-coverage.t
xt/cpan-meta.t
xt/hasversion.t
xt/minimumversion.t
xt/pod-coverage.t
xt/pod.t
xt/synopsis.t
15 changes: 15 additions & 0 deletions MANIFEST.SKIP
@@ -0,0 +1,15 @@
~$
\.bak$
\.old$
^\.git
^blib/
^cover_db/
^Debian_CPANTS\.txt$
^Makefile$
^MANIFEST\.SKIP$
^nytprof
^pm_to_blib$
^tmp/
^TODO$
^xt/author/
^WebService-Google-Language-
26 changes: 0 additions & 26 deletions META.yml

This file was deleted.

76 changes: 60 additions & 16 deletions Makefile.PL
Expand Up @@ -3,22 +3,66 @@ use 5.006;
use strict;
use warnings;

use ExtUtils::MakeMaker;

WriteMakefile(
NAME => 'WebService::Google::Language',
AUTHOR => 'Henning Manske <hma@cpan.org>',
VERSION_FROM => 'lib/WebService/Google/Language.pm',
ABSTRACT_FROM => 'lib/WebService/Google/Language.pm',
($ExtUtils::MakeMaker::VERSION ge 6.3002 ? ( LICENSE => 'perl') : ()),
PL_FILES => {},
use ExtUtils::MakeMaker 6.17;

my $eumm = eval ExtUtils::MakeMaker->VERSION;

my $knows_license = $eumm >= 6.3001;
my $knows_meta = $eumm >= 6.46;
my $knows_min_perl_version = $eumm >= 6.4701;
my $knows_configure_requires = $eumm >= 6.5103;
my $knows_build_requires = $eumm >= 6.5503;

my $NAME = 'WebService::Google::Language';

(my $dist = $NAME) =~ s|::|-|g;
(my $path = $NAME) =~ s|::|/|g;

my $META = {
no_index => {
directory => 'xt',
},
resources => {
homepage => "http://search.cpan.org/dist/$dist/",
bugtracker => "http://github.com/hma/$dist/issues",
repository => "http://github.com/hma/$dist",
license => 'http://dev.perl.org/licenses/',
},
};

my %args = (
NAME => $NAME,
AUTHOR => 'Henning Manske <hma@cpan.org>',
VERSION_FROM => "lib/$path.pm",
ABSTRACT_FROM => "lib/$path.pm",

( $knows_license ? ( LICENSE => 'perl' ) : () ),
( $knows_meta ? ( META_MERGE => $META ) : () ),
( $knows_min_perl_version ? ( MIN_PERL_VERSION => 5.006 ) : () ),
( $knows_configure_requires ? ( CONFIGURE_REQUIRES => { 'ExtUtils::MakeMaker' => '6.17' } ) : () ),

BUILD_REQUIRES => {
'JSON' => '2.0',
'LWP::UserAgent' => '0',
'Test::More' => '0.62',
},
PREREQ_PM => {
'Carp' => 0,
'JSON' => 2.0,
'LWP::UserAgent' => 0,
'Test::More' => 0,
'URI' => 0,
'JSON' => '2.0',
'LWP::UserAgent' => '0',
'URI' => '0',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz' },
clean => { FILES => 'WebService-Google-Language-*' },

dist => { COMPRESS => 'gzip -9f' },
clean => { FILES => "$dist-* cover_db Debian_CPANTS.txt nytprof*" },
test => { TESTS => 't/*.t xt/*.t' },

);

if ( ! $knows_build_requires && (my $br = delete $args{BUILD_REQUIRES}) ) {
my $pp = $args{PREREQ_PM} ||= {};
for (keys %$br) {
$pp->{$_} = $br->{$_} if ! $pp->{$_} || eval $pp->{$_} < eval $br->{$_};
}
}

WriteMakefile(%args);
20 changes: 10 additions & 10 deletions README
Expand Up @@ -12,13 +12,13 @@ SYNOPSIS

use WebService::Google::Language;

$service = WebService::Google::Language->new(
'referer' => 'http://example.com/',
'src' => '',
'dest' => 'en',
my $service = WebService::Google::Language->new(
referer => 'http://example.com/',
src => '',
dest => 'en',
);

$result = $service->translate('Hallo Welt');
my $result = $service->translate('Hallo Welt');
if ($result->error) {
printf "Error code: %s\n", $result->code;
printf "Message: %s\n", $result->message;
Expand Down Expand Up @@ -48,10 +48,9 @@ DEPENDENCIES

This module requires these other modules:

Carp
JSON 2.0+
LWP::UserAgent
Test::More (required by "make test")
Test::More 0.62+ (required by "make test")


DOCUMENTATION
Expand All @@ -64,12 +63,13 @@ the perldoc command:

COPYRIGHT AND LICENCE

Copyright (c) 2008-2009 Henning Manske. All rights reserved.
Copyright (c) 2008-2010 Henning Manske. All rights reserved.

This module is free software. You can redistribute it and/or modify it
under the same terms as Perl itself.
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://www.perl.com/perl/misc/Artistic.html
See http://dev.perl.org/licenses/

This module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down

0 comments on commit 58d9e08

Please sign in to comment.