NAME

MVC::Neaf [ni:f] stands for Not Even A Framework.

OVERVIEW

Neaf offers a simple, yet powerful way to create simple web-applications. By the lazy, for the lazy.

It has a lot of similarities to Dancer and Kelp.

Model is assumed to be a regular Perl module, and is totally out of scope.

View is assumed to have just one method, render(), which receives a hashref and returns a pair of (content, content-type).

Controller is a function that takes one argument (the request) and either returns a hash for rendering, or dies.

die 403; is a valid way to generate a configurable error page.

Request contains everything the application needs to know about the outside world.

EXAMPLE

The following would produce a greeting message depending on the ?name= parameter.

use strict;
use warnings;
use MVC::Neaf;

get + post "/" => sub {
	my $req = shift;

	return {
		-template => \'Hello, [% name %]!',
		-type     => 'text/plain',
		name      => $req->param( name => qr/\w+/, "Stranger" ),
	},
};

neaf->run;

FEATURES

NOT SO BORING FEATURES

MORE EXAMPLES

See example.

Neaf uses examples as an additional test suite.

No feature is considered complete until half a page code snipped is written to demonstrate it.

PHILOSOPHY

BUGS

This package is still under heavy development (with a test coverage of about 80% though).

Use github or CPAN RT to report bugs and propose features.

Bug reports, feature requests, and overall critique are welcome.

CONTRIBUTING TO THIS PROJECT

Please see STYLE.md for the style guide.

Please see CHECKLIST if you plan to release a version.

ACKNOWLEDGEMENTS

Eugene Ponizovsky had great influence over my understanding of MVC.

Alexander Kuklev gave some great early feedback and also drove me towards functional programming and pure functions.

Akzhan Abdulin tricked me into making the hooks.

Cono made some early feedback and great feature proposals.

Ideas were shamelessly stolen from PSGI, Dancer, and Catalyst.

The CGI module was used heavily in the beginning of the project.

LICENSE AND COPYRIGHT

Copyright 2016-2017 Konstantin S. Uvarin aka KHEDIN

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.