Skip to content

Commit

Permalink
more Any::Moose removal
Browse files Browse the repository at this point in the history
  • Loading branch information
creaktive committed Feb 25, 2013
1 parent 6732413 commit 49332b7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 34 deletions.
6 changes: 2 additions & 4 deletions eg/CrawlApache.pm
Expand Up @@ -4,7 +4,8 @@ use utf8;
use warnings qw(all);
use feature qw(say);

use Any::Moose;
use Moo;
use MooX::late;
use Web::Scraper::LibXML;

extends 'YADA::Worker';
Expand Down Expand Up @@ -54,7 +55,4 @@ after finish => sub {
}
};

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

1;
6 changes: 2 additions & 4 deletions eg/fetch-urls.pl
Expand Up @@ -7,7 +7,8 @@ package MyDownloader;
use utf8;
use warnings qw(all);

use Any::Moose;
use Moo;
use MooX::late;

extends 'YADA::Worker';

Expand Down Expand Up @@ -41,9 +42,6 @@ package MyDownloader;
return 1 if $self->getinfo('response_code') =~ m{^5[0-9]{2}$}x;
};

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

1;

package main;
Expand Down
22 changes: 10 additions & 12 deletions inc/Test/HTTP/AnyEvent/Server.pm
Expand Up @@ -8,14 +8,15 @@ use utf8;
use warnings qw(all);

use AnyEvent;
use Any::Moose;
use AnyEvent::Handle;
use AnyEvent::Log;
use AnyEvent::Socket;
use AnyEvent::Util;
use HTTP::Headers;
use HTTP::Request;
use HTTP::Response;
use Moo;
use MooX::Types::MooseLike::Base qw(:all);
use POSIX;

#$AnyEvent::Log::FILTER->level('debug');
Expand All @@ -25,28 +26,28 @@ our $VERSION = '0.006'; # VERSION
my %pool;


has address => (is => 'ro', isa => 'Str', default => sub { '127.0.0.1' }, writer => 'set_address');
has address => (is => 'ro', isa => Str, default => sub { '127.0.0.1' }, writer => 'set_address');


has port => (is => 'ro', isa => 'Int', writer => 'set_port');
has port => (is => 'ro', isa => Int, writer => 'set_port');


has maxconn => (is => 'ro', isa => 'Int', default => sub { 10 });
has maxconn => (is => 'ro', isa => Int, default => sub { 10 });


has timeout => (is => 'ro', isa => 'Int', default => sub { 60 });
has timeout => (is => 'ro', isa => Int, default => sub { 60 });


has disable_proxy => (is => 'ro', isa => 'Bool', default => sub { 1 });
has disable_proxy => (is => 'ro', isa => Bool, default => sub { 1 });


has forked => (is => 'ro', isa => 'Bool', default => sub { 0 });
has forked => (is => 'ro', isa => Bool, default => sub { 0 });


has forked_pid => (is => 'ro', isa => 'Int', writer => 'set_forked_pid');
has forked_pid => (is => 'ro', isa => Int, writer => 'set_forked_pid');


has server => (is => 'ro', isa => 'Ref', writer => 'set_server');
has server => (is => 'ro', isa => Ref, writer => 'set_server');


sub BUILD {
Expand Down Expand Up @@ -276,9 +277,6 @@ sub _reply {
}


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

1;

__END__
Expand Down
10 changes: 4 additions & 6 deletions lib/AnyEvent/Net/Curl/Queued.pm
@@ -1,5 +1,5 @@
package AnyEvent::Net::Curl::Queued;
# ABSTRACT: Any::Moose wrapper for queued downloads via Net::Curl & AnyEvent
# ABSTRACT: Moo wrapper for queued downloads via Net::Curl & AnyEvent

=head1 SYNOPSIS
Expand All @@ -12,7 +12,8 @@ package AnyEvent::Net::Curl::Queued;
use warnings qw(all);
use HTML::LinkExtor;
use Any::Moose;
use Moo;
use MooX::late;
extends 'AnyEvent::Net::Curl::Queued::Easy';
Expand Down Expand Up @@ -42,9 +43,6 @@ package AnyEvent::Net::Curl::Queued;
}
};
no Any::Moose;
__PACKAGE__->meta->make_immutable;
1;
package main;
Expand Down Expand Up @@ -518,7 +516,7 @@ sub wait {
=for :list
* L<AnyEvent>
* L<Any::Moose>
* L<Moo>
* L<Net::Curl>
* L<WWW::Curl>
* L<AnyEvent::Curl::Multi>
Expand Down
11 changes: 4 additions & 7 deletions lib/AnyEvent/Net/Curl/Queued/Easy.pm
@@ -1,5 +1,5 @@
package AnyEvent::Net::Curl::Queued::Easy;
# ABSTRACT: Net::Curl::Easy wrapped by Any::Moose
# ABSTRACT: Net::Curl::Easy wrapped by Moo

=head1 SYNOPSIS
Expand All @@ -8,7 +8,8 @@ package AnyEvent::Net::Curl::Queued::Easy;
use utf8;
use warnings qw(all);
use Any::Moose;
use Moo;
use MooX::late;
use Net::Curl::Easy qw(/^CURLOPT_/);
extends 'AnyEvent::Net::Curl::Queued::Easy';
Expand Down Expand Up @@ -40,9 +41,6 @@ package AnyEvent::Net::Curl::Queued::Easy;
return 1 if $self->getinfo(Net::Curl::Easy::CURLINFO_RESPONSE_CODE) =~ m{^5[0-9]{2}$};
};
no Any::Moose;
__PACKAGE__->meta->make_immutable;
1;
=head1 DESCRIPTION
Expand Down Expand Up @@ -654,8 +652,7 @@ around getinfo => sub {
=head1 SEE ALSO
=for :list
* L<Any::Moose>
* L<MooseX::NonMoose> / L<MouseX::NonMoose>
* L<Moo>
* L<Net::Curl::Easy>
=cut
Expand Down
2 changes: 1 addition & 1 deletion lib/AnyEvent/Net/Curl/Queued/Multi.pm
@@ -1,5 +1,5 @@
package AnyEvent::Net::Curl::Queued::Multi;
# ABSTRACT: Net::Curl::Multi wrapped by Any::Moose
# ABSTRACT: Net::Curl::Multi wrapped by Moo

=head1 SYNOPSIS
Expand Down

0 comments on commit 49332b7

Please sign in to comment.