gitpan / lexical-select Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for Lexical-select
Home Page: http://metacpan.org/release/Lexical-select
License: Other
Read-only release history for Lexical-select
Home Page: http://metacpan.org/release/Lexical-select
License: Other
NAME Lexical::select - provides a lexically scoped currently selected filehandle VERSION version 0.10 SYNOPSIS use Lexical::select; open my $fh, '>', 'fubar' or die "Oh noes!\n"; { my $lxs = lselect $fh; print "Something wicked goes to \$fh \n"; } print "Back on STDOUT\n"; DESCRIPTION Changing the currently selected filehandle with "select" and changing it back to the previously selected filehandle can be slightly tedious. Wouldn't it be great to have something handle this boilerplate, especially in lexical scopes. This is where Lexical::select comes in. Lexical::select provides the "lselect" function. As demonstrated in the "SYNOPSIS", "lselect" will change the currently selected filehandle to the filehandle of your choice for the duration of the enclosing lexical scope. It should be noted that the duration of the selected filehandle is limited to the lexical scope, not the effects of the selected filehandle. FUNCTIONS Functions exported by default. "lselect" Takes one parameter, a "filehandle" that will become the currently selected filehandle for the duration of the enclosing scope. Returns an object, which provides the "restore" method. You can then either "restore" the currently selected filehandle back manually or let the object fall out of scope, which automagically restores. METHODS "restore" Explicitly restores the currently selected filehandle back to the original filehandle. This is called automagically when the object is "DESTROY"ed, for instance when the object goes out of scope. SEE ALSO SelectSaver AUTHOR Chris Williams <[email protected]> COPYRIGHT AND LICENSE This software is copyright (c) 2014 by Chris Williams. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system 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.