Permalink
Browse files

rename Twiggy.pm to Twiggy::Server

  • Loading branch information...
1 parent d7c2f19 commit eee33256ce9c4d12ae50c20c7fcf9baa1c215b0c @miyagawa committed Feb 16, 2010
Showing with 4 additions and 98 deletions.
  1. +1 −1 lib/AnyEvent/Server/PSGI.pm
  2. +1 −1 lib/Plack/Handler/Twiggy.pm
  3. +2 −96 lib/{Twiggy.pm → Twiggy/Server.pm}
@@ -1,4 +1,4 @@
package AnyEvent::Server::PSGI;
-use parent 'Twiggy';
+use parent 'Twiggy::Server';
1;
@@ -1,6 +1,6 @@
package Plack::Handler::Twiggy;
use strict;
-use parent qw( Twiggy );
+use parent qw( Twiggy::Server );
1;
@@ -1,8 +1,6 @@
-package Twiggy;
+package Twiggy::Server;
use strict;
use warnings;
-use 5.008_001;
-our $VERSION = '0.03';
use Scalar::Util qw(blessed weaken);
use Try::Tiny;
@@ -568,99 +566,7 @@ sub close {
sub DESTROY { $_[0]->close }
-package Twiggy;
+package Twiggy::Server;
1;
__END__
-
-=head1 NAME
-
-Twiggy - AnyEvent HTTP server for PSGI (like Thin)
-
-=head1 SYNOPSIS
-
- twiggy --listen :8080
-
-See C<twiggey -h> for more details.
-
- use Twiggy;
-
- my $server = Twiggy->new(
- host => $host,
- port => $port,
- );
- $server->register_service($app);
-
- AE::cv->recv;
-
-=head1 DESCRIPTION
-
-Twiggy is a lightweight and fast HTTP server
-with unique features such as:
-
-=over 4
-
-=item PSGI
-
-Can run any PSGI applications. Fully supports I<psgi.nonblocking> and
-I<psgi.streaming> interfaces.
-
-=item AnyEvent
-
-This server uses AnyEvent and runs in a non-blocking event loop, so
-it's best to run event-driven web applications that runs I/O bound
-jobs or delayed responses such as long-poll, WebSocket or streaming
-content (server push).
-
-=item Fast header parser
-
-Uses XS/C based HTTP header parser for the best performance.
-
-=item Lightweight and Fast
-
-The memory required to run twiggy is 6MB and it can serve more than
-4000 req/s with a single process on Perl 5.10 with MacBook Pro 13"
-late 2009.
-
-=back
-
-=head1 NAMING
-
-=head2 Twiggy?
-
-Because it is like L<Thin|http://code.macournoyer.com/thin/>, Ruby's
-Rack web server using EventMachine. You know, Twiggy is thin :)
-
-=head2 Why the cute name instead of more descriptive namespace? Are you on drugs?
-
-I'm sick of naming Perl software like
-HTTP::Server::PSGI::How::Its::Written::With::What::Module and people
-call it HSSPHIWWWM on IRC. It's hard to say on speeches and newbies
-would ask questions what they stand for every day. That's crazy.
-
-This module actually includes the longer alias and an empty subclass
-L<AnyEvent::Server::PSGI> for those who like to type more ::'s. It
-would actually help you find this software by searching for I<PSGI
-Server AnyEvent> on CPAN, which i believe is a good thing.
-
-Yes, maybe I'm on drugs. We'll see.
-
-=head1 LICENSE
-
-This module is licensed under the same terms as Perl itself.
-
-=head1 AUTHOR
-
-Tatsuhiko Miyagawa
-
-Tokuhiro Matsuno
-
-Yuval Kogman
-
-Hideki Yamamura
-
-=head1 SEE ALSO
-
-L<Plack> L<AnyEvent> L<Tatsumaki>
-
-=cut

0 comments on commit eee3325

Please sign in to comment.