Associate user-defined magic to variables from Perlhttp://search.cpan.org/dist/Variable-Magic/
Magic is Perl's way of enhancing variables. This mechanism lets the user
add extra data to any variable and hook syntactical 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.