gitpan / string-divert Goto Github PK
View Code? Open in Web Editor NEWRead-only release history for String-Divert
Home Page: http://metacpan.org/release/String-Divert
Read-only release history for String-Divert
Home Page: http://metacpan.org/release/String-Divert
String::Divert ============== ABSTRACT String::Divert is small Perl 5 module providing a scalar-like string object with some overloaded operators, supporting the concept of Fold- ing and Diversion. This allows nested generation of structured output. The idea is to decouple the sequential generation of output from the nested and non-sequential structure of the output. The two most prominent examples are the generation of code in SGML/XML based languages like [X]HTML (where large and deeply nested structures occur) and the generation of code in typed 3GL procedural languages like C/C++ (where symbols have to be declared before usage). Here String::Divert allows you to generate the code in steps from the outer to the inner level or to append code to already generated previous or later inserted parts. This is achieved by leveraging two basic concepts: content folding and operation diversion. Content Folding The concept of content folding allows you to fold the content at the current output position by inserting a placeholder corresponding to a sub-output and just proceeding with the output generation. The sub-out- put initially is empty. Once output is appended to it (see diversion below), it will occur at the placeholder position if the content is unfolded later. Folding can be applied to the sub-object again and this way allowing arbitrary nested structures. A sub-output even can be unfolded into multiple placeholder positions. Operation Diversion The concept of operation diversion allows you to automatically divert an operation to one object to another object. Usually this is used for diverting output generation operations on a top-level string object to folded sub-objects without having to deal with multiple object vari- ables and without having to know that you are actually operating on a sub-object. Diversions are applied in a stacked fashion, allowing the stepping back to the previous active diversion. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install
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.