Query: mojolicious::static
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Mojolicious::Static(3pm) User Contributed Perl Documentation Mojolicious::Static(3pm)NAMEMojolicious::Static - Serve static filesSYNOPSISuse Mojolicious::Static; my $static = Mojolicious::Static->new;DESCRIPTIONMojolicious::Static is a dispatcher for static files with "Range" and "If-Modified-Since" support.ATTRIBUTESMojolicious::Static implements the following attributes. "classes" my $classes = $static->classes; $static = $static->classes(['main']); Classes to use for finding files in "DATA" sections, first one has the highest precedence, defaults to "main". # Add another class with static files in DATA section push @{$static->classes}, 'Mojolicious::Plugin::Fun'; "paths" my $paths = $static->paths; $static = $static->paths(['/home/sri/public']); Directories to serve static files from, first one has the highest precedence. # Add another "public" directory push @{$static->paths}, '/home/sri/public';METHODSMojolicious::Static inherits all methods from Mojo::Base and implements the following ones. "dispatch" my $success = $static->dispatch(Mojolicious::Controller->new); Serve static file for Mojolicious::Controller object. "serve" my $success = $static->serve(Mojolicious::Controller->new, 'foo/bar.html'); Serve a specific file, relative to "paths" or from "classes".SEE ALSOMojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojolicious::Static(3pm)
Similar Topics in the Unix Linux Community |
---|
Static |
Static IP / Subnet mask and Gateway |
Static libraries and fork() |
Merge Static and dynamic parts in variable declaration |
Add static text in perl |