Skip to content

Commit

Permalink
less dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nobuo-danjou committed Aug 15, 2010
1 parent c3044d4 commit 7a7c810
Show file tree
Hide file tree
Showing 24 changed files with 33 additions and 43 deletions.
3 changes: 1 addition & 2 deletions Makefile.PL
Expand Up @@ -11,9 +11,8 @@ requires 'Net::OAuth';
requires 'LWP::UserAgent';
requires 'URI';
requires 'Lingua::EN::Inflect::Number';
requires 'namespace::autoclean';
requires_any_moose(
prefer => 'Moose',
prefer => 'Mouse',
moose => '0.56',
mouse => '0.51',
);
Expand Down
4 changes: 4 additions & 0 deletions lib/Net/Google/DataAPI.pm
Expand Up @@ -191,6 +191,10 @@ sub entry_has {
}
}

__PACKAGE__->meta->make_immutable;
no Any::Moose;
no Any::Moose '::Exporter';

1;
__END__
Expand Down
4 changes: 4 additions & 0 deletions lib/Net/Google/DataAPI/Auth/AuthSub.pm
Expand Up @@ -18,4 +18,8 @@ sub sign_request {
return $req;
}

__PACKAGE__->meta->make_immutable;

no Any::Moose;

1;
4 changes: 4 additions & 0 deletions lib/Net/Google/DataAPI/Auth/ClientLogin/Multiple.pm
Expand Up @@ -38,6 +38,10 @@ sub _get_auth_params {
return [ $authsub->auth_params ];
}

__PACKAGE__->meta->make_immutable;

no Any::Moose;

1;
__END__
Expand Down
3 changes: 3 additions & 0 deletions lib/Net/Google/DataAPI/Auth/Null.pm
Expand Up @@ -4,4 +4,7 @@ with 'Net::Google::DataAPI::Role::Auth';

sub sign_request {$_[1]};

__PACKAGE__->meta->make_immutable;
no Any::Moose;

1;
3 changes: 3 additions & 0 deletions lib/Net/Google/DataAPI/Auth/OAuth.pm
Expand Up @@ -145,6 +145,9 @@ sub sign_request {
return $req;
}

__PACKAGE__->meta->make_immutable;
no Any::Moose;

1;
__END__
Expand Down
3 changes: 1 addition & 2 deletions lib/Net/Google/DataAPI/Role/Auth.pm
@@ -1,7 +1,6 @@
package Net::Google::DataAPI::Role::Auth;
use Any::Moose '::Role';
use namespace::autoclean;

requires 'sign_request';
no Any::Moose '::Role';

1;
3 changes: 2 additions & 1 deletion lib/Net/Google/DataAPI/Role/Entry.pm
@@ -1,6 +1,5 @@
package Net::Google::DataAPI::Role::Entry;
use Any::Moose '::Role';
use namespace::autoclean;
use Carp;
use XML::Atom;
use XML::Atom::Entry;
Expand Down Expand Up @@ -133,6 +132,8 @@ sub delete {
return $res->is_success;
}

no Any::Moose '::Role';

1;

__END__
Expand Down
3 changes: 2 additions & 1 deletion lib/Net/Google/DataAPI/Role/HasContent.pm
@@ -1,6 +1,5 @@
package Net::Google::DataAPI::Role::HasContent;
use Any::Moose '::Role';
use namespace::autoclean;
our $VERSION='0.02';

requires 'update';
Expand Down Expand Up @@ -29,6 +28,8 @@ sub param {
}
}

no Any::Moose '::Role';

1;

__END__
Expand Down
3 changes: 2 additions & 1 deletion lib/Net/Google/DataAPI/Role/Service.pm
@@ -1,6 +1,5 @@
package Net::Google::DataAPI::Role::Service;
use Any::Moose '::Role';
use namespace::autoclean;
use Carp;
use LWP::UserAgent;
use URI;
Expand Down Expand Up @@ -213,6 +212,8 @@ sub delete {
return $res;
}

no Any::Moose '::Role';

1;

__END__
Expand Down
5 changes: 5 additions & 0 deletions lib/Net/Google/DataAPI/Types.pm
Expand Up @@ -26,4 +26,9 @@ coerce 'Net::Google::DataAPI::Types::URI'
=> from 'Str'
=> via { URI->new(( m{://} ) ? $_ : ('http://'.$_)) };

__PACKAGE__->meta->make_immutable;

no Any::Moose;
no Any::Moose '::Util::TypeConstraints';

1;
3 changes: 1 addition & 2 deletions t/01_role/01_service/03_request.t
@@ -1,10 +1,9 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;
use Test::MockModule;
use Test::Exception;
use Test::MockObject;
use HTTP::Response;

{
Expand Down
3 changes: 0 additions & 3 deletions t/01_role/01_service/04_methods.t
@@ -1,7 +1,5 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;
use Test::MockModule;
use HTTP::Response;
Expand All @@ -22,7 +20,6 @@ use HTTP::Response;
default => 'http://example.com/myfeed',
);
}

my $ua = Test::MockModule->new('LWP::UserAgent');
my $ok_res = HTTP::Response->parse(<<END);
200 OK
Expand Down
1 change: 0 additions & 1 deletion t/01_role/01_service/05_debug.t
@@ -1,7 +1,6 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;
use Test::MockModule;
use Test::Warn;
Expand Down
1 change: 0 additions & 1 deletion t/01_role/02_entry/01_instanciate.t
@@ -1,7 +1,6 @@
use strict;
use warnings;
use Test::More;
use t::Util;

BEGIN {
use_ok 'Net::Google::DataAPI::Role::Entry';
Expand Down
1 change: 0 additions & 1 deletion t/01_role/02_entry/02_update.t
Expand Up @@ -4,7 +4,6 @@ use Test::More;
use Test::MockModule;
use Test::Exception;
use HTTP::Response;
use t::Util;

{
package MyEntry;
Expand Down
1 change: 0 additions & 1 deletion t/02_feedurl/01_basic.t
@@ -1,7 +1,6 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;

BEGIN {
Expand Down
1 change: 0 additions & 1 deletion t/02_feedurl/02_add.t
@@ -1,7 +1,6 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;
use Test::Exception;
use Test::MockModule;
Expand Down
1 change: 0 additions & 1 deletion t/02_feedurl/03_list.t
@@ -1,7 +1,6 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;
use Test::MockModule;
use Test::MockObject;
Expand Down
1 change: 0 additions & 1 deletion t/02_feedurl/04_delete.t
@@ -1,7 +1,6 @@
use strict;
use warnings;
use lib 't/lib';
use t::Util;
use Test::More;
use Test::Exception;
use Test::MockModule;
Expand Down
1 change: 0 additions & 1 deletion t/02_feedurl/05_error.t
@@ -1,6 +1,5 @@
use strict;
use warnings;
use t::Util;
use Test::More;
use Test::Exception;
use Test::MockModule;
Expand Down
1 change: 0 additions & 1 deletion t/03_entry_has/01_basic.t
@@ -1,6 +1,5 @@
use strict;
use warnings;
use t::Util;
use Test::More;
use Test::MockModule;
use HTTP::Response;
Expand Down
2 changes: 1 addition & 1 deletion t/05_types.t
Expand Up @@ -3,7 +3,7 @@ use URI;

{
package My::Test;
use Moose;
use Any::Moose;
use Net::Google::DataAPI::Types;

has url => (
Expand Down
21 changes: 0 additions & 21 deletions t/Util.pm

This file was deleted.

0 comments on commit 7a7c810

Please sign in to comment.