Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Script or webserver?

Application

Dancer provides you with a bunch of fancy keywords, but its really just a fancy PSGI application at heart :) and can run on any PSGI server without modification (or CGI or mod_perl or whatever .... ) thanks to Plack

Most any CGI program with proper scoping of variables ( CGI to mod_perl Porting. mod_perl Coding guidelines ) can be trivially converted into a PSGI application, and it can run on Dancer/Mojo... Plack, any PSGI server, and it can have as NICE or CRAZY of a url as you want (provided you abstracted your url/link writing stuff so its easy to customize)

Try it out cgi-app / mojo / dancer / catalyst / titanium and you'll see they all generate a module and various scripts, for example

$ dancer -a MyDancerApp
+ MyDancerApp
+ MyDancerApp\bin
+ MyDancerApp\bin\app.pl
+ MyDancerApp\config.yml
+ MyDancerApp\environments
+ MyDancerApp\environments\development.yml
+ MyDancerApp\environments\production.yml
+ MyDancerApp\views
+ MyDancerApp\views\index.tt
+ MyDancerApp\views\layouts
+ MyDancerApp\views\layouts\main.tt
+ MyDancerApp\MANIFEST.SKIP
+ MyDancerApp\lib
  MyDancerApp\lib
+ MyDancerApp\lib\MyDancerApp.pm
+ MyDancerApp\public
+ MyDancerApp\public\css
+ MyDancerApp\public\css\style.css
+ MyDancerApp\public\css\error.css
+ MyDancerApp\public\images
+ MyDancerApp\public\500.html
+ MyDancerApp\public\404.html
+ MyDancerApp\public\dispatch.fcgi
+ MyDancerApp\public\dispatch.cgi
+ MyDancerApp\public\javascripts
+ MyDancerApp\public\javascripts\jquery.js
+ MyDancerApp\t
+ MyDancerApp\t\002_index_route.t
+ MyDancerApp\t\001_base.t
+ MyDancerApp\Makefile.PL

app.pl runs the built-in Dancer webserver unless it is loaded via Plack::Runner or other PSGI webserver, which is done via dispatch.cgi so you can run it from a cgi-bin :)

See Dancer::Deployment - common ways to put your Dancer app into use

Also, search around for plack/dancer slideshows/presentations, they give a nice overview


In reply to Re^4: Do you hide .pl extension on web pages? (PSGI Application) by Anonymous Monk
in thread Do you hide .pl extension on web pages? by punch_card_don

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-24 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found