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.174.748 Times

Sub::ForceEval 2.04

Company: Steven Lembark
Date Added: November 20, 2013  |  Visits: 227

Sub::ForceEval

Report Broken Link
Printer Friendly Version


Product Homepage
Download (38 downloads)



Subroutines that are marked with the ForceEval attribute check at runtime if there is an eval on the stack when the call dies. If an eval is found then the die is propagated to it via die $@; if not then cluck (see Carp) is called and the die is trapped.<br /><br />The stack is only checked if something dies, so there is relatively little overhead in using the attribute: just an eval and intermediate storage of the return values.<br /><br />Note that this inludes anything that dies for any reason even if the death is not intended as an OO 'exception'. This can be helpful for long-lived processes that need to ensure survival. It can also be handy for subs that call modules which use Fatal: all of the fatalities can be guaranteed to be gracefully handled.<br /><br />If exception objects are preferred to flat $@ values then a constructor can be provided with the use. This will be broken into class and method portions and called to construct an object from the exception; individual subs can also provide a constructor.<br /><br />Sub::ForceEval is a Perl module for eval subroutines, re-throw exceptions if there is an eval; otherwise cluck and return undef.<br /><br />SYNOPSIS<br /><br /> # you may just want your death recorded...<br /> #<br /> # if foo dies in an eval then $@ will be re-thrown,<br /> # otherwise foo will cluck, return undef, and keep<br /> # going.<br /><br /> use Sub::ForceEval;<br /><br /> sub foo :ForceEval<br /> {<br /> ...<br /> }<br /><br /> # a bare call to foo() in the main code will cluck.<br /><br /> foo();<br /><br /> # the exception is re-thrown here, however, since<br /> # bletch was called from within an eval.<br /><br /> eval { bletch() };<br /><br /> sub bletch { bar() }<br /><br /> sub bar { foo() }<br /><br /><br /> # ... or you may want an exceptional death.<br /> #<br /> # the default in MyClass is to have ForceEval<br /> # call My::Class::Default- >constructor( $@ )<br /> # before re-throwing, marine re-throws<br /> # Dive::Dive- >dive( $@ ).<br /><br /> package MyClass;<br /><br /> use Sub::ForceEval qw( My::Class::Default- >constructor );<br /><br /> sub marine :ForceEval( 'Dive::Dive- >dive' );<br /><br /> # then again, you may just want to record or<br /> # tidy up the message. in this case, you can pass<br /> # in a function without the '- >' separator and<br /> # it'll be callsed as function( $@ ).<br /><br /> use Sub::ForceEval qw( Some::Package::function );

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Attribute Bletch Called Cluck Death Exception Forceeval Function Gtconstructor Individual Marine Myclass Myclassdefault Rethrown Return Stack Subforceeval
Users rating: 0/10

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


SUB::FORCEEVAL RELATED
Modules  -  Single Random Post 1.02
The post can be called through the single_random_post() template function. InstallationUnpack and upload it to the /wp-content/plugins/ directory.Activate the plugin through the 'Plugins' menu in WordPress. Requirements: - WordPress 2.0 or higher
 
Libraries  -  Exception::Class::TCF 0.03
Exception::Class::TCF is a Java/C++ style exception handling. SYNOPSIS try BLOCK [ [catch] NAME FUN_REF ]* throw [ EXCEPTION LIST ] package EnclosureException; @ISA = qw(Exception::Class::TCF); package main; use Exception::Class::TCF;...
11.26 KB  
Miscellaneous  -  Simplified attribute accessors using overloading 1.0
This script presents an ideom for simplified accessors, that combines typical getter and setter functionality of an attribute into a single overloaded method, that instead of getATTRIBUTE and setATTRIBUTE can now just be called ATTRIBUTE. When...
 
Development Tools  -  New Block Library Simulink called The Phase Filter 1.0
It is a new block simulink signal library called the Phase Filter.The transfert function is F(p)=(1+T1p)/(1+T2p).Students can change parameters T1 and T2 time constants of filter.The phase filter in automatic control is for Corrector block and...
10 KB  
Communication  -  String Letter Counter Function 1.0
Statement: strLetterCounter('string')....where, 'string' is an input string containing alphabet or numbers.Ex: string='aaaaaaaabbbbbbccd'Statement: strLetterCounter(string)Output: '8a,6b,2c,1d'Note: This function is different from the Matlab...
10 KB  
Programming  -  Nasal 1.0
Nasal is a language that I wrote for use in a personal project. Ostensibly it was because I was frustrated with the dearth of small-but-complete embeddable scripting languages, but of course I really wrote it because it was fun. It is still...
102.4 KB  
Network & Internet  -  myAJAX 6.1.0
myAJAX is an AJAX Javascript OOP implementation. Object myAJAX PARAMETERS url = pages URL urlParameters = pages parameters method = HEAD, GET or POST with a defaul value of GET refreshInterval = sets the execution of AJAX request...
30.72 KB  
Miscellaneous  -  PyCrash 0.4pre3 1.0
PyCrash is a Run-Time Exception Dumper which handles uncaught exceptions during the execution of Python programs and collects information about the program context. PyCrash can be very useful in report bug information, because the programmer can...
 
Programming  -  ssdeep 2.5
This is a straightforward Python wrapper for ssdeep by Jesse Kornblum, which is a library for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of...
317.44 KB  
Libraries  -  Locale::Maketext::Lexicon::Gettext 0.62
Locale::Maketext::Lexicon::Gettext is a Perl module for PO and MO file parser for Maketext. SYNOPSIS Called via Locale::Maketext::Lexicon: package Hello::I18N; use base Locale::Maketext; use Locale::Maketext::Lexicon { de => [Gettext =>...
83.97 KB  
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