Unix and Linux Discussions Tagged with 2.6 |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
1,593 |
Solaris |
|
|
|
14 |
10,248 |
Solaris |
|
|
|
0 |
1,908 |
Software Releases - RSS News |
|
|
|
0 |
1,076 |
Software Releases - RSS News |
|
|
|
0 |
1,184 |
Software Releases - RSS News |
|
|
|
0 |
1,370 |
Software Releases - RSS News |
|
|
|
0 |
1,078 |
Software Releases - RSS News |
|
|
|
0 |
1,047 |
Software Releases - RSS News |
|
|
|
0 |
1,109 |
Software Releases - RSS News |
|
|
|
0 |
1,080 |
Software Releases - RSS News |
|
|
|
0 |
1,105 |
Software Releases - RSS News |
|
|
|
0 |
1,138 |
Software Releases - RSS News |
|
|
|
0 |
984 |
Software Releases - RSS News |
|
|
|
0 |
1,031 |
Software Releases - RSS News |
|
|
|
0 |
1,014 |
Software Releases - RSS News |
|
|
|
0 |
1,647 |
Software Releases - RSS News |
|
|
|
0 |
5,117 |
Web Development |
|
|
|
0 |
1,065 |
Software Releases - RSS News |
|
|
|
0 |
1,109 |
Software Releases - RSS News |
|
|
|
0 |
969 |
Software Releases - RSS News |
|
|
|
0 |
985 |
Software Releases - RSS News |
|
|
|
0 |
874 |
Software Releases - RSS News |
|
|
|
0 |
1,288 |
Software Releases - RSS News |
|
|
|
0 |
1,142 |
Software Releases - RSS News |
|
|
|
0 |
916 |
Software Releases - RSS News |
|
|
|
0 |
1,856 |
OS X OpenSource RSS |
|
|
|
0 |
967 |
Software Releases - RSS News |
|
|
|
0 |
951 |
Software Releases - RSS News |
|
|
|
0 |
1,092 |
Software Releases - RSS News |
|
|
|
0 |
785 |
Software Releases - RSS News |
|
|
|
0 |
1,091 |
Software Releases - RSS News |
|
|
|
0 |
1,049 |
Software Releases - RSS News |
|
|
|
0 |
849 |
Software Releases - RSS News |
|
|
|
0 |
902 |
Software Releases - RSS News |
|
|
|
0 |
926 |
Software Releases - RSS News |
|
|
|
0 |
833 |
Software Releases - RSS News |
|
|
|
0 |
898 |
Software Releases - RSS News |
|
|
|
0 |
764 |
Software Releases - RSS News |
|
|
|
0 |
999 |
Software Releases - RSS News |
|
|
|
0 |
1,401 |
Software Releases - RSS News |
Web::Simple::Deployment(3pm) User Contributed Perl Documentation Web::Simple::Deployment(3pm)
NAME
Web::Simple::Deployment - various deployment options
DESCRIPTION
This file documents common deployment methods for Web::Simple. If you feel one is missing, please ask in the IRC channel and we'll work
with you to add it.
CGI
The most basic deployment option is as a CGI script loading and running your Web::Simple-module:
#!/usr/bin/env perl
use Your::Web::Simple::App;
Your::Web::Simple::App->run_if_script;
Save that as script.cgi and your web server will handle it correctly.
Plack-Server
This works in with exactly the same code as CGI deployment. However instead of letting your web server load script.cgi, you run this on the
command line:
plackup script.cgi
Self-contained CGI
Sometimes your app is so small that you have only one or two tiny classes that you want to run as a CGI script. Web::Simple offers a
helpful mechanism to achieve that.
#!/usr/bin/env perl
use Web::Simple 'HelloWorld'; # enables strictures and warnings for the file
# additionally, HelloWorld is upgraded to a
# Web::Simple application
{
package HelloWorld;
sub dispatch_request {
sub (GET) {
[
200,
[ 'Content-type', 'text/plain' ],
[ 'Hello world! It is a fine ' . HelloWorld::Helper->day ]
]
},
sub () {
[ 405, [ 'Content-type', 'text/plain' ], [ 'Method not allowed' ] ]
}
}
}
{
package HelloWorld::Helper;
use DateTime;
sub day {
return DateTime->now->day_name;
}
}
HelloWorld->run_if_script;
AUTHORS
See Web::Simple for authors.
COPYRIGHT AND LICENSE
See Web::Simple for the copyright and license.
perl v5.14.2 2012-05-07 Web::Simple::Deployment(3pm)