Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.886.974 Times

vars::global 0.0.1

  Date Added: June 20, 2010  |  Visits: 824

vars::global

Report Broken Link
Printer Friendly Version


Product Homepage
Download (74 downloads)



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..

Requirements: No special requirements
Platforms: Linux
Keyword: Create Foo Global Global Variable Global Variables Import Libraries Perl Module Programming Qw To Make Tries To Variables Varsglobal
Users rating: 0/10

License: Freeware Size: 7.17 KB
USER REVIEWS
More Reviews or Write Review


VARS::GLOBAL RELATED
Libraries  -  Variable::Strongly::Typed 1.1.0
Variable::Strongly::Typed is a Perl module to let some variables be strongly typed. SYNOPSIS use Variable::Strongly::Typed; my $int :TYPE(int); # must have an int value my $float :TYPE(float); # must have a float value my $string...
10.24 KB  
Libraries  -  Variable::Strongly::Typed::Validators 1.1.0
Variable::Strongly::Typed::Validators is Perl module with built-in type validators. SYNOPSIS This class is utilized by Variable::Strongly::Typed - you dont access this directly. This module defines a %conditions hash contained expressions that...
10.24 KB  
Libraries  -  Java::Import 0.03
Java::Import is Perl module to use Java classes in Perl. SYNOPSIS use Java::Import qw( some.package.SomeClass ); my $instance = new some.package.SomeClass(); $instance->someMethod(); my $ret_val =...
28.67 KB  
Libraries  -  Variable::Strongly::Typed::Scalar 1.1.0
Variable::Strongly::Typed::Scalar is Perl module for strongly typed scalar. SYNOPSIS This class is utilized by Variable::Strongly::Typed - you dont access this directly =head1 DESCRIPTION.
10.24 KB  
Libraries  -  B::LexInfo 0.02
B::LexInfo is a Perl module that shows information about subroutine lexical variables. SYNOPSIS use B::ShowLex (); my $lexi = B::ShowLex->new; Perl stores lexical variable names and values inside a padlist within the subroutine. Certain...
5.12 KB  
ActiveX Components  -  MinGW 3.4.1
The GNU Compiler Collection (GCC) for Windows MinGW - A collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do...
15 MB  
Libraries  -  Devel::FindGlobals 0.03
Devel::FindGlobals is a Perl module to find global variables and their size. SYNOPSIS use Devel::FindGlobals; print print_globals_sizes(); This module just runs around and over the symbol table, finds global variables, gets their sizes with...
3.07 KB  
Libraries  -  VCS::PVCS 0.02
VCS::PVCS is a Perl module with global configuration class for for VCS::PVCS::*. SYNOPSIS use VCS::PVCS::Project; # preferred $project = new VCS::PVCS::Project("ProjectName"); The VCS::PVCS class simply parses the PVCS global configuration...
26.62 KB  
Libraries  -  Language::Basic::Variable 1.44
Language::Basic::Variable is a Perl module to handle parsing and implementing BASIC variables. SYNOPSIS See Language::Basic for the overview of how the Language::Basic module works. This pod page is more technical. There are two sorts of...
52.22 KB  
Libraries  -  Test::Data 1.20
Test::Data is a Perl module to test functions for particular variable types. SYNOPSIS use Test::Data qw(Scalar Array Hash Function); Test::Data provides utility functions to check properties and values of data and variables. Functions...
8.19 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB