# Generated by Pod::WikiDoc version 0.18 =pod =head1 NAME Acme::Locals - Interpolate like PythonERuby. =head1 VERSION This document describes Acme::Locals version v0.0.1 =head1 SYNOPSIS # Python mode use Acme::Locals qw(-python :all); sub foo { my $x = 10; my $y = 100; my $who = "world"; sayx '%(x)d %(y)d hello %(who)s!', locals(); } # Ruby mode use Acme::Locals qw(-ruby :all); sub bar { my $x = 10; my $y = 100; my $who = "world"; sayx '#{x} #{y} hello #{who}'; } =head1 DESCRIPTION This module let's you interpolate like Python and Ruby. =head1 SUBROUTINESEMETHODS =head2 CLASS METHODS =head3 C<<< sayx $format @fmt_vars >>> printEputs like pythonEruby. =head3 C<<< printx $format @fmt_vars >>> printf like pythonEruby. =head3 C<<< sprintx $format @fmt_vars >>> sprintf like pythonEruby. =head3 C<<< locals() >>> Return a hash of all lexical variables in the current scope. (Using PadWalker). =head3 C<<< globals() >>> Return a hash of all global variables. (Using PadWalker). =head3 C<<< lexicals() >>> Alias to C<<< locals() >>> =head2 PRIVATE CLASS METHODS =head1 DIAGNOSTICS =head1 CONFIGURATION AND ENVIRONMENT This module requires no configuration file or environment variables. =head1 DEPENDENCIES =over =item * L =back =over =item * L =back =over =item * L =back =head1 INCOMPATIBILITIES None known. =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to L, or through the web interface at L. =head1 SEE ALSO =head1 AUTHOR Ask Solem, L. with thanks to sverrej for inspiration :) =head1 LICENSE AND COPYRIGHT Copyright (c), 2007 Ask Solem L. C<<< Acme::Locals >>> is distributed under the Modified BSD License. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation andEor other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS ANDEOR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY ANDEOR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =for stopwords vim expandtab shiftround # Local Variables: # mode: cperl # cperl-indent-level: 4 # fill-column: 78 # End: # vim: expandtab tabstop=4 shiftwidth=4 shiftround