Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dancer::plugins(3pm) [debian man page]

Dancer::Plugins(3pm)					User Contributed Perl Documentation				      Dancer::Plugins(3pm)

NAME
Dancer::Plugins - interesting plugins to add to Dancer's capabilities DESCRIPTION
Dancer aims to keep the core as small as possible, but there are a growing number of useful plugins to add helpful features. This document provides a quick summary of some recommended plugins. PLUGINS
Dancer::Plugin::Database Provides easy database access via DBI, reading the DB connection details from your app's config file, and taking care of ensuring the connection is still valid and reconnecting if not (useful in persistent environments). Just calling the "database" keyword gives you a connected and working database handle. It also provides some helpful keywords to make inserting/updating data as simple as it should be. Dancer::Plugin::DBIC Provides easy acces to DBIx::Class database virtualization. Dancer::Plugin::Auth::RBAC Dancer Authentication, Security and Role-Based Access Control Framework. Dancer::Plugin::Email Provides easy email-sending powered by Email::Send - simply call the "email" keyword. Email sending settings can be taken from your app's config. Dancer::Plugin::SMS Send SMS text messages to mobile phones from your Dancer app, using any service supported by SMS::Send. Dancer::Plugin::Ajax Provides easy way to add Ajax route handlers. Dancer::Plugin::REST Makes writing RESTful web services easy. Dancer::Plugin::SiteMap Automatically provides site maps (as a HTML page, or as an XML sitemap ready for Google) based on the routes your app defines. Dancer::Plugin::Validation Easy data validation powered by Oogly. Dancer::Plugin::Params::Normalization Provides different ways of normalizing parameter names Dancer::Plugin::SimpleCRUD Provides easy CRUD (create, read, update, delete) facilities, automatically creating routes to display, add, edit and delete data from a database table. Dancer::Plugin::WebSocket Supports building apps using Web Sockets for bi-directional, full-duplex communications over a long-lived socket connection. Dancer::Plugin::Memcached Cache page responses or individual items of data with memcached for performance. Dancer::Plugin::MobileDevice Quickly determine whether the client is a mobile browser, in order to offer a simplified layout, or otherwise customise features. Dancer::Plugin::NYTProf Provides dead-simple profiling of your app using Devel::NYTProf - enables profiling for each request individually, serves up a list of profiling runs, and generates & sends the HTML reports produced by "nytprofhtml". Dancer::Plugin::Bcrypt Provides simple effective password hashing and validation using Bcrypt. Dancer::Plugin::Cache::CHI Provides caching for generated pages and/or arbitrary data. Uses CHI, so is backend-agnostic - caching can be done in memory, to files, using Memcache, in a database, or any other method for which there is a CHI::Driver module. Dancer::Plugin::Thumbnail Easy thumbnail generation using GD. Dancer::Plugin::Captcha::SecurityImage Easy CAPTCHA image generation and validation, using GD. Dancer::Plugin::Facebook Easily work with Facebook's Graph API from your Perl Dancer app. Uses Facebook::Graph. Dancer::Plugin::Redis Easy Redis database connections, based upon Dancer::Plugin::Database. Dancer::Plugin::XML::RSS Easy XML RSS creation and consumption. More plugins are appearing on CPAN all the time - just search for "Dancer::Plugin" to see what may have been released since this document was last updated! perl v5.14.2 2011-11-30 Dancer::Plugins(3pm)

Check Out this Related Man Page

Dancer::Plugin::FlashMessage(3pm)			User Contributed Perl Documentation			 Dancer::Plugin::FlashMessage(3pm)

NAME
Dancer::Plugin::FlashMessage - Dancer plugin to display temporary messages, so called "flash messages". VERSION
version 0.314 DESCRIPTION
This plugin helps you display temporary messages, so called "flash messages". It provides a "flash()" method to define the message. The plugin then takes care of attaching the content to the session, propagating it to the templating system, and then removing it from the session. However, it's up to you to have a place in your views or layout where the message will be displayed. But that's not too hard (see SYNOPSYS). Basically, the plugin gives you access to the 'flash' hash in your views. It can be used to display flash messages. By default, the plugin works using a decent configuration. However, you can change the behaviour of the plugin. See CONFIGURATION NAME
Dancer::Plugin::FlashMessage - A plugin to display "flash messages" : short temporary messages SYNOPSYS
Example with Template Toolkit In your configuration, make sure you have session configured. Of course you can use any session engine : session: "simple" In your index.tt view or in your layout : <% IF flash.error %> <div class=error> <% flash.error %> </div> <% END %> In your css : .error { background: #CEE5F5; padding: 0.5em; border: 1px solid #AACBE2; } In your Dancer App : package MyWebService; use Dancer; use Dancer::Plugin::FlashMessage; get '/hello' => sub { flash error => 'Error message'; template 'index'; }; METHODS
flash # sets the flash message for the warning key flash warning => 'some warning message'; # retrieves and removes the flash message for the warning key my $warning_message = flash 'warning'; This method can take 1 or 2 parameters. When called with two parameters, it sets the flash message for the given key. When called with one parameter, it returns the value of the flash message of the given key. The message is deleted from the flash hash in the session. In both cases, "flash" always returns the value; IN YOUR TEMPLATE
After having set a flash message using "flash" in your Dancer route, you can access the flash message from within your template. The plugin provides you with the "flash" hashref, that you can access in your template, for example like this : <div class=error> <% flash.error %> </div> When you use it in your template, the flash message is deleted. So next time, "flash.error" will not exist. CONFIGURATION
With no configuration whatsoever, the plugin will work fine, thus contributing to the keep it simple motto of Dancer. configuration default values These are the default values. See below for a description of the keys plugins: FlashMessage: token_name: flash session_hash_key: _flash configuration description token_name The name of the template token that will contain the hash of flash messages. Default : "flash" session_hash_key You probably don't need that, but this setting allows you to change the name of the session key used to store the hash of flash messages. It may be useful in the unlikely case where you have key name conflicts in your session. Default : "_flash" COPYRIGHT
This software is copyright (c) 2011 by Damien "dams" Krotkine <dams@cpan.org>. LICENCE
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. AUTHORS
This module has been written by Damien "dams" Krotkine <dams@cpan.org>. SEE ALSO
Dancer AUTHOR
Damien "dams" Krotkine COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Damien "dams" Krotkine. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-11-26 Dancer::Plugin::FlashMessage(3pm)
Man Page