here::install - easily install compile time transforms
use here::install 'my::lvalue' => sub { map "my \$$_; sub $_ ():lvalue {\$$_}" => @_ }; use my::lvalue qw(foo bar); # my $foo; sub foo ():lvalue {$foo} my $bar; ... foo = 3; say foo; # 3 say $foo; # 3 bar = 4; say bar++; # 4 say $bar; # 5
you can remove the pseudo-modules manually:
no here::install 'my::lvalue';
or let the declaration fall out of scope if B::Hooks::EndOfScope is installed:
{ use here::install ...; use ...; # works } use ...; # error
here::install is a wrapper around here.
here::install
see here::declare for additional examples.
Eric Strom, <asg at cpan.org>
<asg at cpan.org>
please report any bugs or feature requests to bug-here at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=here. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-here at rt.cpan.org
copyright 2011 Eric Strom.
this program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
see http://dev.perl.org/licenses/ for more information.
To install here, copy and paste the appropriate command in to your terminal.
cpanm
cpanm here
CPAN shell
perl -MCPAN -e shell install here
For more information on module installation, please visit the detailed CPAN module installation guide.