Acme-Your
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
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.
lib/Acme/Your.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Acme::Your - not our variables, your variables
=head1 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";
=head1 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.
lib/Acme/Your/Filter.pm view on Meta::CPAN
use strict;
use warnings;
use Filter::Simple;
use Parse::RecDescent;
FILTER_ONLY executable => \&_filter_code;
# it's also all on one line because I don't want to disturb the line
# numbers too much
use Data::Dumper;
sub _filter_code {
s/\b((?:have|your)\b.*?;)/ _transform_statement( $1 ) /ge;
}
my $grammar = q
{
list : identifier
| '(' plist ')'
plist : identifier ',' plist
t/03preexist.t view on Meta::CPAN
#!perl
use warnings;
use strict;
use Test::More tests => 2;
use Data::Dumper;
use Acme::Your "Data::Dumper";
your $Varname;
is($Data::Dumper::Varname, "VAR", "hasn't affected globals");
is($Varname, "VAR", "preexisting is right");
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.550 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )