NAME
Acme::Your - not our variables, your variables
SYNOPSIS
use Data::Dumper;
use Acme::Your "Data::Dumper";
your $Varname; # This is really $Data::Dumper::Varname
print "The default variable name for DD is $Varname";
DESCRIPTION
Acme::Your gives you a language construct "your" that behaves similarly
to Perl's own "our" constuct. Rather than defining lexically unqualified
varibles to be in our own package however, you can define lexically
unqualified variable to be from anothter package namespace entirely.
It all starts with the use statement.
use Acme::Your "Some::Package";
This both 'imports' the your construct and states the package that any
variables defined with a your statement will be created in.
Then you can do 'your' statements. Note that these are lexical, and fall
out of scope much the same way that our variables would. For example
use Acme::Your "Fred"
my $foo = "bar";
{
your $foo = "wilma";
print $foo; # prints "wilma"
}
print $foo; # prints "foo"
print $Fred::foo # prints "wilma"
Your allows you to import symbols from other packages into your own
lexical scope and have access to them.
BUGS
Acme::Your functions by parsing your source code and filtering it with a
source filter. It is possible to fool the parser with some pathelogical
cases and you should be aware that this module faces all the standard
problems that perl faces when parsing Perl Code.
VERSION
Acme::Your 0.01 was released on 14th January 2002.
AUTHOR
Richard Clamp <
[email protected]>
Original idea, documentation, and tests which kill, Mark Fowler
<
[email protected]>
COPYRIGHT
Copyright (C) 2002 Richard Clamp and Mark Fowler.
All Rights Reserved.
This module is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
SEE ALSO
the Filter::Simple manpage, the Parse::RecDescent manpage.