vars::global 0.0.1
Sponsored Links
vars::global 0.0.1 Ranking & Summary
File size:
0.007 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1017
Date added:
2007-01-11
Publisher:
Flavio Poletti
vars::global 0.0.1 description
vars::global is a Perl module that tries to make global variables a little safer.
SYNOPSIS
# In the place/package where we want to create globals
use vars::global create => qw( $foo @bar %baz );
# Add some more global symbols
vars::global->create(qw( $hello @world %now ));
# Somewhere else, where we need to access those globals
use vars::global qw( $foo @bar %baz );
# Dont try to use globals that do not exist
use vars::global qw( $Foo ); # typo, croaks
use vars::global qw( @inexistent ); # we dont create by default
# use create as above
# You can also import and create new globals
use vars::global qw( $foo %baz ), create => qw( $hey @joe );
# If youre lazy, you can import all the globals defined so far
use vars::global :all;
This module lets you define global variables and gain a slight advantage over blind use of package variables.
The global variables live inside the vars::global package, with the names given by the user. Where the advantage? Its two-fold:
there is an import mechanism that lets you access the global variable without the need to fully qualify its name (i.e. using $foo instead of $vars::global::foo);
the import mechanism ensures that you can import only the global variables that have been explicitly declared so far, which reduces the possibility of a typo.
If you have already "created" the global variable $foo, the import operation is equivalent to do:
*{__PACKAGE__ . ::foo} = $vars::global::foo;
that is, the package variable in the current package is made an alias for the global variable.
The anti-typo check is simply obtained by doing a check before the above import.
Typical usage is as follows:
creation
Early in the module or in the program you create variables prepending the create word, as follows:
use vars::global create => qw( $foo @bar %baz );
access
In the modules where you need to access a given global variable, you can import them very simply:
use vars::global qw( $foo %baz ); # I dont need @bar here ;)
The creation step above automatically imports all the new globals into the current package.
SYNOPSIS
# In the place/package where we want to create globals
use vars::global create => qw( $foo @bar %baz );
# Add some more global symbols
vars::global->create(qw( $hello @world %now ));
# Somewhere else, where we need to access those globals
use vars::global qw( $foo @bar %baz );
# Dont try to use globals that do not exist
use vars::global qw( $Foo ); # typo, croaks
use vars::global qw( @inexistent ); # we dont create by default
# use create as above
# You can also import and create new globals
use vars::global qw( $foo %baz ), create => qw( $hey @joe );
# If youre lazy, you can import all the globals defined so far
use vars::global :all;
This module lets you define global variables and gain a slight advantage over blind use of package variables.
The global variables live inside the vars::global package, with the names given by the user. Where the advantage? Its two-fold:
there is an import mechanism that lets you access the global variable without the need to fully qualify its name (i.e. using $foo instead of $vars::global::foo);
the import mechanism ensures that you can import only the global variables that have been explicitly declared so far, which reduces the possibility of a typo.
If you have already "created" the global variable $foo, the import operation is equivalent to do:
*{__PACKAGE__ . ::foo} = $vars::global::foo;
that is, the package variable in the current package is made an alias for the global variable.
The anti-typo check is simply obtained by doing a check before the above import.
Typical usage is as follows:
creation
Early in the module or in the program you create variables prepending the create word, as follows:
use vars::global create => qw( $foo @bar %baz );
access
In the modules where you need to access a given global variable, you can import them very simply:
use vars::global qw( $foo %baz ); # I dont need @bar here ;)
The creation step above automatically imports all the new globals into the current package.
vars::global 0.0.1 Screenshot
vars::global 0.0.1 Keywords
Global variables
tries to
To make
Perl module
Global variable
global
create
QW
variables
Foo
import
vars::global
varsglobal
vars::global 0.0.1
Libraries
Programming
Bookmark vars::global 0.0.1
vars::global 0.0.1 Copyright
WareSeeker periodically updates pricing and software information of vars::global 0.0.1 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of vars::global 0.0.1 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
global variables example
php global variables
javascript global variables
global variables php
global variables in c
c++ global variables
local and global variables
global variables python
global dimming
create hotmail account
importers
variables in algebra
spss defining global variables
independent variables
pier 1 imports
create avatar
global tv
perl global variables
Related Software
Devel::FindGlobals is a Perl module to find global variables and their size. Free Download
Symbol is a Perl module created to manipulate Perl symbols and their names. Free Download
dtRdr::Logger is a Perl module for global logging. Free Download
dtRdr::Hack is a Perl module with self-documenting adaptive finger-wagging global vars. Free Download
ex::constant::vars is a Perl pragma to create readonly variables. Free Download
Class::XML is a Perl module for simple XML Abstraction. Free Download
Class::Maker Perl module contains classes, reflection, schema, serialization, attribute- and multiple inheritance. Free Download
Image::WorldMap is a Perl module to create graphical world maps of data. Free Download
Latest Software
Popular Software
Favourite Software