JE::Scope(3pm) User Contributed Perl Documentation JE::Scope(3pm)NAME
JE::Scope - JavaScript scope chain (what makes closures work)
DESCRIPTION
JavaScript code runs within an execution context which has a scope chain associated with it. This class implements this scope chain. When a
variable is accessed the objects in the scope chain are searched till the variable is found.
A JE::Scope object can also be used as global (JE) object. Any methods it does not understand will be delegated to the object at the bottom
of the stack (the far end of the chain), so that "$scope->null" means the same thing as "$scope->[0]->null".
Objects of this class consist of a reference to an array, the elements of which are the objects in the chain (the first element being the
global object). (Think of it as a stack.)
METHODS
find_var($name, $value)
find_var($name)
This method searches through the scope chain, starting at the end of the array, until it finds the variable named by the first
argument. If the second argument is present, it sets the variable. It then returns an lvalue (a JE::LValue object) that references the
variable.
new_var($name, $value)
new_var($name)
This method creates (and optionally sets the value of) a new variable in the variable object (the same thing that JavaScript's "var"
keyword does) and returns an lvalue.
The variable object is the first object in the scope chain (searching from the top of the stack) that is a call object, or
"$scope->[0]" if no call object is found.
CONSTRUCTOR
None. Just bless an array reference. You should not need to do this because it is done for you by the "JE" and "JE::Object::Function"
classes.
SEE ALSO
JE
JE::LValue
JE::Object::Function
perl v5.14.2 2012-03-18 JE::Scope(3pm)
Check Out this Related Man Page
KiokuDB::Linker(3pm) User Contributed Perl Documentation KiokuDB::Linker(3pm)NAME
KiokuDB::Linker - Relinks live objects from storage entries
SYNOPSIS
# mostly internal
DESCRIPTION
The linker reconnects entry data, recreating the connected object graph in memory.
The linkage process starts with an ID (or several IDs) to be loaded passed to the "get_or_load_objects" method.
This ID will first be searched for in the live object set (KiokuDB::LiveObjects). If the object is already live, then it will be returned
as is.
If the object is not live, then the corresponding entry is fetched from the backend, and expanded into an actual instance.
Expansion consults the KiokuDB::TypeMap using KiokuDB::TypeMap::Resolver, to find the correct typemap entry (see "COLLAPSING STRATEGIES" in
KiokuDB::Collapser and KiokuDB::TypeMap), and that is used for the actual expansion.
Most of the grunt work is delegated by the entries back to the linker using the "inflate_data" method, which handles circular structures,
retrying of tied structures, etc.
Inflated objects are registered with KiokuDB::LiveObjects, and get inserted into the current live object scope
(KiokuDB::LiveObjects::Scope). The scope's job is to maintain a reference count of at least 1 for any loaded object, until it is destroyed
itself. This ensures that weak references are not destroyed prematurely, but allows their use in order to avoid memory leaks.
perl v5.12.4 2010-10-11 KiokuDB::Linker(3pm)
I've been wondering if I can make mutexes much easier to use in C++ with creative use of a locking class and variable scope, but I'm not sure if things happen in the order I want. Here's pseudocode for something that could use the class:
int someclass::getvalue()
{
int retval;
... (0 Replies)
My awk script searches for specified patterns in a text file and stores these values into mem variables.
Once this is done I want to Insert these values into a table.
How can I avail of the variable values outside the scope of awk script....
One method that I have tried is to write the... (7 Replies)
Hi everybody,
Firstly, this would be the first time I'm using JavaScript. My background is mainly Perl. Nevertheless, here's my problem.
So I've created a function
function linkout(url){
setTimeout("window.open(url)",5000) //in milliseconds
}
However because the variable "url" is... (0 Replies)
Hi!
Ok, so I'm no programmer and I have basically no experience in these stuff. However I need to work on a thing (I think you call it Framework) called Root. It's a tool used by physicists. In the manual they keep talking about Environment variable. Even thou I searched for what it is on the... (5 Replies)
Hi
I'm hoping someone can tell me how to extend the scope of an exported function in the korn shell.
I have written a function in a file that I dot in from my .kshrc file and it works fine.
However I would like this function to be available to anyone in a certain group on the machine... (10 Replies)
Hi All
Is there is any way to maintain the scope of the variable in unix
Example
x=1
j=1
while
do
..
....
....
while
do
..
..
x=x+1
done
#inner most while loop ends here
done
#outer loop ends here (8 Replies)
Hi,
I'm a Delphi developer new to linux, new to this forums and new to BASH programming and got a new task in my work: maintaining an existing set of BASH scripts. First thing I want to do is making the code more reliable as in my opinion it's really bad written. So here's the quest:
I'm... (6 Replies)
Hello I am attempting to generate a bash scrip that prompts me at loggin to change my PS1 -
However, I am running into an issue w/ the code.
#!/bin/bash
#the point of this script is to that it automates and changes my prompts every day
msg1="What do you feel like adding today :"
echo... (11 Replies)
I have to admit that i have not used Perl at all and this is a singular occasion where i have to patch an existing Perl script. I dearly hope i do not have to do it again for the next 15 years and therefore try to avoid having to learn the programming language in earnest.
The OS is AIX 7.1, the... (2 Replies)