Download Variable::Magic 0.48

Antivirus information.

We did not scan Variable::Magic 0.48 for viruses, adware, spyware or other type of malware. For your own protection it's recommended to have an updated antivirus installed on your computer when downloading and installing programs from freesoftware0.

freesoftware0 lists downloads from various software publishers, so if you have a question regarding a particular software contact the publisher directly. The download links for Variable::Magic 0.48 are provided to you by freesoftware0 without any warranties, representations or gurantees of any kind, so download at your own risk.


Magic is Perl way of enhancing objects. This mechanism lets the user add extra data to any variable and hook syntaxical operations (such as access, assignment or destruction) that can be applied to it. With this module, you can add your own magic to any variable without having to write a single line of XS.

You'll realize that these magic variables look a lot like tied variables. It's not surprising, as tied variables are implemented as a special kind of magic, just like any 'irregular' Perl variable : scalars like $!, $( or $^W, the %ENV and %SIG hashes, the @ISA array, vec() and substr() lvalues, threads::shared variables... They all share the same underlying C API, and this module gives you direct access to it.


 use Variable::Magic qw/wizard cast VMG_OP_INFO_NAME/;

 { # A variable tracer
 my $wiz = wizard set => sub { print "now set to ${$_[0]}!\n" },
 free => sub { print "destroyed!\n" };

 my $a = 1;
 cast $a, $wiz;
 $a = 2; # "now set to 2!"
 } # "destroyed!"

 { # A hash with a default value
 my $wiz = wizard data => sub { $_[1] },
 fetch => sub { $_[2] = $_[1] unless exists $_[0]->{$_[2]}; () },
 store => sub { print "key $_[2] stored in $_[-1]\n" },
 copy_key => 1,
 op_info => VMG_OP_INFO_NAME;

 my %h = (_default => 0, apple => 2);
 cast %h, $wiz, '_default';
 print $h{banana}, "\n"; # "0", because the 'banana' key doesn't exist in %h
 $h{pear} = 1; # "key pear stored in helem"

Product's homepage


· Perl

Related programsOur Recommendations

radvd 1.9.8

radvd is an open source command-line software designed to act as an IPv6 router advertisement


Mauve 2.3.1

Mauve project is a system for efficiently constructing multiple genome alignments in the presence


zc.zkzeo 0.3.0

zc.zkzeo can be used as a service registry. Servers can register themselves and clients can


Demi Lovato 3 Theme

Demi Lovato 3 theme for Google Chrome browser that fits most resolutions.About Google ChromeGoogle


indianrailways 0.1

indianrailways is a Python library to interact with Indian Railways website.Product's



phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the


Hackernews::Parser 0.1

Hackernews::Parser is a Perl interface to Hackernews ( stories and


Splice 2.5.1

Splice is a label maker for: CDs, DAT tapes, 8mm tapes, and analog cassette tapes. Splice project


iFreeBudget 2.0.36

iFreeBudget is a free, open source budgeting and personal finance management application. It is


Japanese translation for eyeOS 1.0

Japanese translation for eyeOS package offers an eyeOS translation in Japanese language.About


Thumbnail of Variable::Magic 0.48


4 stars

Price: FREE

Publisher/Developer: Vincent Pit

Release Date: Jun 23, 2012

View Program Details

Top Downloadslast week