Parse::Perl::Environment - reified Perl lexical environment
An object of this class encapsulates a lexical environment for Perl source code. Such an object can be used to influence Perl parsing, through the parse_perl function in Parse::Perl. An environment object is most commonly generated by capturing the environment of running Perl code, through the current_environment operator in Parse::Perl.
parse_perl
current_environment
The things determined by the lexical environment, which are encapsulated by this class, include:
current package (controlled by package directives)
package
activation of warnings (controlled by the warnings module)
enforcement of language stricture (controlled by the strict module)
availability of optional language features (controlled by the feature module)
various other standard pragmata, such as integer, locale, sort, utf8
array base offset ($[)
$[
the lexical hints hash %^H, and hence the various (mainly non-core) pragmata that are implemented through it
%^H
visibility of lexical variables (introduced by my, our, or state)
my
our
state
Objects of this class are not meant to be examined manually. The layout varies between Perl versions, and between versions of the Parse::Perl module.
This module provides no way to examine environments, or to create new environments other than by capturing an existing one. These shortcomings should be addressed in a future version.
Parse::Perl
Andrew Main (Zefram) <zefram@fysh.org>
Copyright (C) 2009, 2010, 2011, 2012 Andrew Main (Zefram) <zefram@fysh.org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Parse::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::Perl
CPAN shell
perl -MCPAN -e shell install Parse::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.