Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

jifty::view::static::handler(3pm) [debian man page]

Jifty::View::Static::Handler(3pm)			User Contributed Perl Documentation			 Jifty::View::Static::Handler(3pm)

NAME
Jifty::View::Static::Handler - Jifty view handler for static files DESCRIPTION
This is deprecated and is being port to a stack of plack middleware and plack::app::file This class takes care of serving out static files for a Jifty application. When fully operational, it will use an algorithm along the lines of the following: * Static files are served out of a separate root * If static files go through apache: * How do we merge together the N static roots? * If static files go through Jifty::Handler * We need a flag to allow them to go through the dispatcher, too * return "True" (304) for if-modified-since * if the browser accepts gzipped data, see if we have a cached gzipped copy if so, send it see if we have a marker indicating that gzip is a lose if so, send uncompressed gzip the content send the gzipped content * if the browser doesn't accept gzipped content send the content uncompressed new Create a new static file handler. Likely, only the "Jifty::Handler" needs to do this. roots Returns all the static roots the handler will search show $path Handle a request for $path. If we can't find a static file of that name, return undef. handle_request $path An alias for "show" file_path $path Returns the system path for $path, searching inside the application's static root, loaded plugins' static roots, and finally Jifty's static root. Returns undef if it can't find the file in any path. template_exists $path An alias for "file_path". mime_type $path Returns the mime type of the file whose path on disk is $path. Tries to use MIME::Types to guess first. If that fails, it falls back to "File::MMagic". send_file $path $mimetype Print $path to STDOUT (the client), identified with a mimetype of $mimetype. send_http_header [COMPRESSION, LENGTH, LAST_MODIFIED] Sends appropriate cache control and expiration headers such that the client will cache the content. COMPRESSION is deprecated send_not_modified Sends a "304 Not modified" response to the browser, telling it to use a cached copy. perl v5.14.2 2010-09-25 Jifty::View::Static::Handler(3pm)

Check Out this Related Man Page

Jifty::Plugin(3pm)					User Contributed Perl Documentation					Jifty::Plugin(3pm)

NAME
Jifty::Plugin - Describes a plugin to the Jifty framework DESCRIPTION
Plugins are like mini-apps. They come in packages with share directories which provide static and template files; they provide actions; they have dispatcher rules. To create the skeleton of a new plugin, you can use the command: jifty plugin --name SomePlugin To use a plugin in your Jifty application, find the "Plugins:" line in the "config.yml" file: Plugins: - SpiffyThing: {} - SomePlugin: arguments: to the: constructor The dispatcher for a plugin should live in "Jifty::Plugin::name::Dispatcher"; it is written like any other Jifty::Dispatcher. Plugin dispatcher rules are checked before the application's rules; however, see "Plugins and rule ordering" in Jifty::Dispatcher for how to manually specify exceptions to this. Actions and models under a plugin's namespace are automatically discovered and made available to applications. new Sets up a new instance of this plugin. This is called by Jifty after reading the configuration file, and is supplied whatever plugin- specific settings were in the config file. Note that because plugins affect Mason's component roots, adding plugins during runtime is not supported. init [ARGS] Called by "new", this does any custom configuration that the plugin might need. It is passed the same parameters as "new", gleaned from the configuration file. new_request Called right before every request. By default, does nothing. template_root Returns the root of the "HTML::Mason" template directory for this plugin po_root Returns the plugin's message catalog directory. Returns undef if it doesn't exist. template_class Returns the Template::Declare view package for this plugin static_root Returns the root of the static directory for this plugin dispatcher Returns the classname of the dispatcher class for this plugin prereq_plugins Returns an array of plugin module names that this plugin depends on. version Returns the database version of the plugin. Needs to be bumped any time the database schema needs to be updated. Plugins that do not directly define any models don't need to worry about this. bootstrapper Returns the name of the class that can be used to bootstrap the database models. This normally returns the plugin's class name with "::Bootstrap" added to the end. Plugin bootstrappers can be built in exactly the same way as application bootstraps. See Jifty::Bootstrap. upgrade_class Returns the name of the class that can be used to upgrade the database models and schema (such as adding new data, fixing default values, and renaming columns). This normally returns the plugin's class name with "::Upgrade" added to the end. Plugin upgrade classes can be built in exactly the same was as application upgrade classes. See Jifty::Upgrade. table_prefix Returns a prefix that will be placed in the front of all table names for plugin models. Be default, the plugin name is converted to an identifier based upon the class name. wrap Takes a PSGI-$app closure and returns the wrapped one if your plugin wants to do something to the request handling process. See also Plack::Middleware. psgi_app_static Returns a PSGI-$app that serves the static content of the plugin if any. The default is a <Plack::App::File> app with root set to plugin's "static_root" perl v5.14.2 2010-12-08 Jifty::Plugin(3pm)
Man Page