Eval::TypeTiny - Online Linux Manual PageSection : 3pm
Updated : 2021-02-24
Source : perl v5.32.1
Note : User Contributed Perl Documentation
NAMEEval::TypeTiny − utility to evaluate a string of Perl code in a clean environment
STATUSThis module is covered by the Type-Tiny stability policy.
DESCRIPTIONThis module is used by Type::Tiny to compile coderefs from strings of Perl code, and hashrefs of variables to close over.
FunctionsThis module exports one function, which works much like the similarly named function from Eval::Closure: eval_closure(source => $source, environment => \%env, %opt)
ConstantsThe following constants may be exported, but are not by default. HAS_LEXICAL_SUBS Boolean indicating whether Eval::TypeTiny has support for lexical subs. (This feature requires Perl 5.18.) ALIAS_IMPLEMENTATION Returns a string indicating what implementation of alias => 1 is being used. Eval::TypeTiny will automatically choose the best implementation. This constant can be matched against the IMPLEMENTAION_* constants. IMPLEMENTATION_NATIVE If ALIAS_IMPLEMENTATION eq IMPLEMENTATION_NATIVE then Eval::TypeTiny is currently using Perl 5.22's native alias feature. This requires Perl 5.22. IMPLEMENTATION_DEVEL_LEXALIAS If ALIAS_IMPLEMENTATION eq IMPLEMENTATION_DEVEL_LEXALIAS then Eval::TypeTiny is currently using Devel::LexAlias to provide aliases. IMPLEMENTATION_PADWALKER If ALIAS_IMPLEMENTATION eq IMPLEMENTATION_PADWALKER then Eval::TypeTiny is currently using PadWalker to provide aliases. IMPLEMENTATION_TIE If ALIAS_IMPLEMENTATION eq IMPLEMENTATION_TIE then Eval::TypeTiny is using the fallback implementation of aliases using tie. This is the slowest implementation, and may cause problems in certain edge cases, like trying to alias already-tied variables, but it's the only way to implement alias => 1 without a recent version of Perl or one of the two optional modules mentioned above.
EVALUATION ENVIRONMENTThe evaluation is performed in the presence of strict, but the absence of warnings. (This is different to Eval::Closure which enables warnings for compiled closures.) The feature pragma is not active in the evaluation environment, so the following will not work: use feature qw(say);
use Eval::TypeTiny qw(eval_closure);
my $say_all = eval_closure(
source => 'sub { say for @_ }',
);
$say_all−>("Hello", "World");
The feature pragma does not ‟carry over” into the stringy eval. It is of course possible to import pragmas into the evaluated string as part of the string itself: use Eval::TypeTiny qw(eval_closure);
my $say_all = eval_closure(
source => 'sub { use feature qw(say); say for @_ }',
);
$say_all−>("Hello", "World");
BUGSPlease report any bugs to <https://github.com/tobyink/p5−type−tiny/issues>.
SEE ALSOEval::Closure, Error::TypeTiny::Compilation.
AUTHORToby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCEThis software is copyright (c) 2013−2014, 2017−2021 by Toby Inkster. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIESTHIS PACKAGE IS PROVIDED ‟AS IS” AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 0
Johanes Gumabo
Data Size : 11,510 byte
man-Eval::TypeTiny.3pmBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 3 / 203,461
Visitor ID : :
Visitor IP : 3.145.179.30 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|Eval::TypeTiny.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|Eval::TypeTiny.3pm|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|Eval::TypeTiny.3pm|43|br══─}─══|'br══─}─══
) (htmlprn|149|Eval::TypeTiny.3pm|43|'br══─}─══ |'br══─}─══
)