GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Language::Expr::Compiler::Base(3) User Contributed Perl Documentation Language::Expr::Compiler::Base(3)

Language::Expr::Compiler::Base - Base class for Expr compilers

This document describes version 0.29 of Language::Expr::Compiler::Base (from Perl distribution Language-Expr), released on 2016-07-03.

Used to mark compile output string with various unique strings, and later on revisit these markers and substitute for other, final values. This technique is kind of a hack, used for subexpression, inserting PHP use() statement (because they must be processed outward to inward), etc.

Map Expr function to target language's function/method/property.

Can be set to a coderef that will be called during parsing whenever variable is encountered. The coderef is called with variable name as argument, and expected to return target language code to handle the variable. By default, if this attribute is not set, variable in expression is returned as is (e.g. '$foo' becomes '$foo' in Perl), which means some will result in error (e.g. '${name that contains some symbols that makes it invalid Perl}').

If the coderef returns undef, the default behaviour is used.

Note that due to current limitation of Perl regex and/or Regexp::Grammars, you cannot use any regex in your hook_var.

Can be set to a coderef that will be called during parsing whenever a function call is encountered. The coderef is called as its arguments function name and list of arguments and expected to return target language code to handle the function call. By default, if this attribute is not set, variable in expression is returned as is (e.g. 'foo(1, 2, 3)' becomes 'foo(1, 2, 3)' in Perl).

If the coderef returns undef, the default behaviour is used.

Note that due to current limitation of Perl regex and/or Regexp::Grammars, you cannot use any regex in your hook_var.

Create a new marker. Return a unique ID to be placed in compiled output.

marker_ids() => ARRAY

Return an array of all marker IDs.

marker_ids_re() => STRING

Return a regex that matches marker IDs.

Please visit the project's homepage at <https://metacpan.org/release/Language-Expr>.

Source repository is at <https://github.com/sharyanto/perl-Language-Expr>.

Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Public/Dist/Display.html?Name=Language-Expr>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

perlancar <perlancar@cpan.org>

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2016-07-03 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.