Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: shelling/http-balancer
base: 1a5ad143c1
...
head fork: shelling/http-balancer
compare: ea5878ddd6
  • 3 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 11, 2013
shelling provide HTTP::Balancer::Role::Command
HTTP::Balancer::Command with Role::Command
HTTP::Balancer::Command as the root handler
44015e1
shelling make sure Role::Command consumes Namespace::Dispatch bd90380
shelling ignore MYMETA.* ea5878d
1  .gitignore
View
@@ -9,3 +9,4 @@ Makefile.old
nytprof.out
MANIFEST.bak
*.sw[po]
+MYMETA.*
4 Makefile.PL
View
@@ -12,11 +12,11 @@ requires 'Modern::Perl';
requires 'Moose';
requires 'MooseX::Getopt';
requires 'MooseX::Singleton';
-requires 'Namespace::Dispatch' => '0.04';
+requires 'Namespace::Dispatch' => '0.05';
test_requires 'Test::More';
-tests 't/*.t';
+tests 't/*.t t/*/*.t';
author_tests 'xt';
auto_include;
3  lib/HTTP/Balancer.pm
View
@@ -24,7 +24,7 @@ __END__
=head1 NAME
-HTTP::Balancer - build http load balancer
+HTTP::Balancer - manage your http load balancer in seconds
=head1 SYNOPSIS
@@ -43,6 +43,7 @@ shelling E<lt>navyblueshellingford@gmail.comE<gt>
=head1 SEE ALSO
L<Namespace::Dispatch>
+L<MooseX::Getopt>
=head1 LICENSE
13 lib/HTTP/Balancer/Command.pm
View
@@ -0,0 +1,13 @@
+package HTTP::Balancer::Command;
+
+use Modern::Perl;
+
+use Moose;
+
+with qw( HTTP::Balancer::Role::Command );
+
+sub run {
+ my ($self, ) = @_;
+}
+
+1;
25 lib/HTTP/Balancer/Role.pm
View
@@ -0,0 +1,25 @@
+package HTTP::Balancer::Role;
+
+use Modern::Perl;
+
+use Moose::Role;
+
+
+
+no Moose::Role;
+
+1;
+
+=pod
+
+=head1 NAME
+
+HTTP::Balancer::Role - base of all roles of HTTP::Balancer
+
+=head1 SYNOPSIS
+
+ package HTTP::Balancer::Role::Foo;
+ use Moose::Role;
+ with qw( HTTP::Balancer::Role );
+
+=cut
37 lib/HTTP/Balancer/Role/Command.pm
View
@@ -0,0 +1,37 @@
+package HTTP::Balancer::Role::Command;
+
+use Modern::Perl;
+
+use Moose::Role;
+
+use Namespace::Dispatch;
+
+with qw( HTTP::Balancer::Role
+ MooseX::Getopt::Dashes );
+
+=head1 NAME
+
+=head1 SYNOPSIS
+
+ package HTTP::Balancer::Command::SomeCommand;
+ use Moose;
+ with qw( HTTP::Balancer::Role::Command );
+
+=head1 METHODS
+
+=head2 prepare()
+
+the instance method called before running.
+
+the method is here to be hooked with 'around' keyword of Moose.
+
+=cut
+
+sub prepare {
+ my ($self, ) = @_;
+ return $self;
+}
+
+no Moose::Role;
+
+1;
12 t/role/command.t
View
@@ -0,0 +1,12 @@
+use Modern::Perl;
+use Test::More;
+
+BEGIN {
+ use_ok 'HTTP::Balancer::Role::Command';
+}
+
+ok (
+ HTTP::Balancer::Role::Command->meta->does_role("Namespace::Dispatch")
+);
+
+done_testing;

No commit comments for this range

Something went wrong with that request. Please try again.