gitpan / lexical-failure Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for Lexical-Failure
Home Page: http://metacpan.org/release/Lexical-Failure
Read-only release history for Lexical-Failure
Home Page: http://metacpan.org/release/Lexical-Failure
Lexical::Failure version 0.000007 This module sets up two new keywords: C<fail> and C<ON_FAILURE>, with which you can quickly create modules whose failure signaling is lexcially scoped, under the control of client code. Normally, modules specify some fixed mechanism for error handling and require client code to adapt to that policy. One module may signal errors by returning C<undef>, or perhaps some special "error object". Another may C<die> or C<croak> on failure. A third may set a flag variable. A fourth may require the client code to set up a callback, which is executed on failure. If you are using all four modules, your own code now has to check for failure in four different ways, depending on where the failing component originated. If you would rather that I<all> components throw exceptions, or all return C<undef>, you will probably have to write wrappers around 3/4 of them, to convert from their "native" failure mechanism to your preferred one. Lexical::Failure offers an alternative: a simple mechanism with which module authors can generically specify "fail here with this message" (using the C<fail> keyword), but then allow each block of client code to decide how that failure is reported to it within its own lexical scope (using the C<ON_FAILURE> keyword). Module authors can still provide a default failure signaling mechanism, for when client code does not specify how errors are to be reported. This is handy for ensuring backwards compatibility in existing modules that are converted to this new failure signaling approach. INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install Alternatively, to install with Module::Build, you can use the following commands: perl Build.PL ./Build ./Build test ./Build install DEPENDENCIES None. COPYRIGHT AND LICENCE Copyright (C) 2013, Damian Conway This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.