Ricardo SIGNES

NAME

Global::Context::Env - the global execution environment

VERSION

version 0.003

OVERVIEW

Global::Context::Env is a role.

Global::Context::Env objects are the heart of the Global::Context system. They're the things that go in the shared $Context variable, and they're the things that point to the AuthToken, Terminal, and Stack.

ATTRIBUTES

auth_token

Every environment either has an auth token that does Global::Context::AuthToken or it has none. This attribute cannot be changed after initialization.

The agent method will return undef if there is no auth token, and will otherwise get the agent from the token.

terminal

Every environment has a terminal that does Global::Context::Terminal. This attribute cannot be changed after initialization.

stack

Every environment has a stack that does Global::Context::Stack. This attribute cannot be changed after initialization.

Instead, the with_pushed_frame method is used to create a clone of the entire environment, save for a new frame pushed onto the stack.

METHODS

stack_trace

->stack_trace is a convenience method that returns a list containing the string representation of each frame in the stack.

AUTHOR

Ricardo Signes <rjbs@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Ricardo Signes.

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