Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

MeToo.pm is a nano web application framework for Perl

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 MeToo.pod
Octocat-spinner-32 README
README
README for MeToo.pm
===================

MeToo.pm is a nano web application framework for Perl. Since everybody has 
written an own web application framework, I can do so, too.


What is MeToo.pm?
=================

It's a nano web application framework, for two reasons:
1) it's supposed to be super-tiny, below 3kB and 100 SLOCs. This will probably change, 
   but not too much.
2) it depends on nothing but Perl core modules.

It's NOT supposed to be a full-featured, high-performance web application 
framework.

The principal idea is to quickly hack small CGI scripts in a style similar to 
Dancer, copy it to your cgi-bin directory, add one RewriteRule to your 
webserver configuration, and have a web application with simple request routing 
and shiny URLs.


Usage
=====

First of all,

	use MeToo;

Then define your route handlers, in a style similar to Dancer:

	get "/" => sub {
		# ...
	};

	post "/foo" => sub {
		# ...
	};

	get "/get/(.*)" => sub {
		# match is in $_[0]
	};

And finally, make your application available under a nice URL:

	RewriteRule ^/foo(.*)$ /cgi-bin/yourscript.cgi$1 [QSA,PT,L]

Every request to /foo... will now be passed to your application and handled by 
the route handlers. The routes are relative to the prefix that you defined in 
the RewriteRule.

For a more complete example, see sample.cgi, and for documentation, see 
MeToo.pod, which contains documentation in POD format.


Author
======

Andreas Krennmair <ak@synflood.at>


License
=======

See the LICENSE file for further license information.
Something went wrong with that request. Please try again.