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::I18N(3pm)					User Contributed Perl Documentation					  Jifty::I18N(3pm)

NAME
Jifty::I18N - Internationalization framework for Jifty SYNOPSIS
# Whenever you need an internationalized string: print _('Hello, %1!', 'World'); In your Mason templates: <% _('Hello, %1!', 'World') %> METHODS
"_" This module provides a method named "_", which allows you to quickly and easily include localized strings in your application. The first argument is the string to be translated. If that string contains placeholders, the remaining arguments are used to replace the placeholders. The placeholders in the form of "%1" where the number is the number of the argument used to replace it: _('Welcome %1 to the %2', 'Bob', 'World'); This example would return the string "Welcome Bob to the World" if no translation is being performed. new Set up Jifty's internationalization for your application. This pulls in Jifty's PO files, your PO files and then exports the _ function into the wider world. install_global_loc available_languages Return an array of available languages _get_file_patterns Get list of patterns for all PO files in the project. (Paths are gotten from the configuration variables and plugins). get_language_handle Get the language handle for this request. get_current_language Get the current language for this request, formatted as a Locale::Maketext subclass string (i.e., "zh_tw" instead of "zh-TW"). refresh Used by Jifty::Handler in DevelMode to reload .po files whenever they are modified on disk. promote_encoding STRING [CONTENT-TYPE] Return STRING promoted to our best-guess of an appropriate encoding. STRING should not have the UTF-8 flag set when passed in. Optionally, you can pass a MIME content-type string as a second argument. If it contains a charset= parameter, we will use that encoding. Failing that, we use Encode::Guess to guess between UTF-8 and iso-latin-1. If that fails, and the string validates as UTF-8, we assume that. Finally, we fall back on returning the string as is. maybe_decode_utf8 STRING Attempt to decode STRING as UTF-8. If STRING is not valid UTF-8, or already contains wide characters, return it undecoded. N.B: In an ideal world, we wouldn't need this function, since we would know whether any given piece of input is UTF-8. However, the world is not ideal. perl v5.14.2 2010-09-25 Jifty::I18N(3pm)
Man Page