Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.071.576 Times

Params::CallbackRequest 1.19

Company: David Wheeler
Date Added: June 18, 2013  |  Visits: 336

Params::CallbackRequest

Report Broken Link
Printer Friendly Version


Product Homepage
Download (35 downloads)



Params::CallbackRequest is a Perl module that provides functional and object-oriented callbacks to method and function parameters. Callbacks may be either code references provided to the new() constructor, or methods defined in subclasses of Params::Callback. Callbacks are triggered either for every call to the Params::CallbackRequest request() method, or by specially named keys in the parameters to request().<br /><br />The idea behind this module is to provide a sort of plugin architecture for Perl templating systems. Callbacks are triggered by the contents of a request to the Perl templating server, before the templating system itself executes. This approach allows you to carry out logical processing of data submitted from a form, to affect the contents of the request parameters before they're passed to the templating system for processing, and even to redirect or abort the request before the templating system handles it.<br /><br />SYNOPSIS<br /><br />Functional parameter-triggered callbacks:<br /><br /> use strict;<br /> use Params::CallbackRequest;<br /><br /> # Create a callback function.<br /> sub calc_time {<br /> my $cb = shift;<br /> my $params = $cb->params;<br /> my $val = $cb->value;<br /> $params->{my_time} = localtime($val || time);<br /> }<br /><br /> # Set up a callback request object.<br /> my $cb_request = Params::CallbackRequest->new(<br /> callbacks => [ { cb_key => 'calc_time',<br /> pkg_key => 'myCallbacker',<br /> cb => &calc_time } ]<br /> );<br /><br /> # Request callback execution.<br /> my %params = ('myCallbacker|calc_time_cb' => 1);<br /> $cb_request->request(%params);<br /><br /> # Demonstrate the result.<br /> print "The time is $params{my_time}<br />";<br /><br />Or, in a subclass of Params::Callback:<br /><br /> package MyApp::Callback;<br /> use base qw(Params::Callback);<br /> __PACKAGE__->register_subclass( class_key => 'myCallbacker' );<br /><br /> # Set up a callback method.<br /> sub calc_time : Callback {<br /> my $self = shift;<br /> my $params = $self->request_params;<br /> my $val = $cb->value;<br /> $params->{my_time} = localtime($val || time);<br /> }<br /><br />And then, in your application:<br /><br /> # Load order is important here!<br /> use MyApp::Callback;<br /> use Params::CallbackRequest;<br /><br /> my $cb_request = Params::Callback->new( cb_classes => [qw(myCallbacker)] );<br /> my %params = ('myCallbacker|calc_time_cb' => 1);<br /> $cb_request->request(%params);<br /> print "The time is $params{my_time}<br />";

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Calc Time Callback Callbacks Cbgtvalue Contents Localtimeval Method Mycallbacker Calc Time Parameters Params Paramscallbackrequest Paramscallbackrequest 1 19 Paramsgtmy Time Print Request Requestgtrequestparams Shift System Templating
Users rating: 0/10

License: Freeware Size: 30.72 KB
USER REVIEWS
More Reviews or Write Review


PARAMS::CALLBACKREQUEST RELATED
Libraries  -  Time::Format 1.02
Time::Format is a Perl module for easy-to-use date/time formatting. SYNOPSIS use Time::Format qw(%time %strftime %manip); $time{$format} $time{$format, $unixtime} print "Today is $time{yyyy/mm/dd}n"; print "Yesterday was...
38.91 KB  
Screen Savers  -  Time Zones for Mac OS 1.2
Displays different clocks in various styles for all time zones within the mac system settings. - Your Local Time (ie your computer setting) is displayed in the centre of the screen. - The alternative clock can be read if you count the highlighted...
706.56 KB  
Calendar  -  Sync the system clock to the naval time server 1.1
This software gets the date from a naval time server and updates the system clock for posix OS supporting the "date" command. It also requires an internet connection.
 
Business  -  Web Time Entry 6.090714
Web Time Entry is a Web based project time entry and client billing system. It can track, approve, and manage employee time incurred for projects and clients you define. It can schedule projects to employees and track time incurred on project schedul
28.79 MB  
Network & Internet  -  mod_sleep 2.1
mod_sleep module simply sleeps a fixed length of time every request. The sleep time can be configured globally, or per , , or . This module serves more as an example than providing any really useful...
24.58 KB  
Web Authoring  -  TrackSite Free 5.2.5
Advanced, cross-platform, easy-to-use, portable, real-time monitoring and statistical analysis system for website traffic, excellent tool for website management and development. Features: advanced analysis and reporting with 40 (12 free)reports,...
747 KB  
Backup Utilities  -  AutoVer 1.1
AutoVer is a configurable, automatic or real time backup and personal versioning system. It can be used as a simple real time backup or as a more complex version control system. The beauty of this system is that once you set it up (which is...
449 KB  
Desktop Utilities  -  GWorkspace 0.8.5
GWorkspace is a clone of the NeXT workspace manager with some added features as spatial viewing, real-time auditing of the file-system, an advanced database based search system, etc. GWorkspace application is ready for daily usage. The...
3.7 MB  
Astronomy  -  DESA Satellite Tracker 1.x
Satellite Tracking Software that allows you to track the International Space Station and other satellites in real time. Easy to use. Radar system alerts you to satellites that is within viewing range.
977.54 KB  
Utilities  -  iBackup for Mac OS 7.0.1
A simple to use backup/restore utility for scheduled backups of your system preferences, like the dock, deskop picture, time settings, firewall, bluetooth and system applications like AddressBook, Mail, Stikies, iChat, iTunes and more. You can...
16.1 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB