Acme-Pythonic
view release on metacpan or search on metacpan
lib/Acme/Pythonic.pm view on Meta::CPAN
my %authors = (Perl => "Larry Wall",
Python => "Guido van Rossum")
As in Python, comments can be intermixed there:
my %hello = (Catalan => 'Hola', # my mother tongue
English => 'Hello',)
Acme::Pythonic munges a source that has already been processed by L<Filter::Simple>. In particular, L<Filter::Simple> blanks out quotelikes whose content is not even seen by Acme::Pythonic so backslashes in C<qw//> and friends won't be removed:
# Do not put backslashes here because qw// is bypassed
my @colors = qw(Red
Blue
Green)
=head1 CAVEATS
Although this module makes possible some Python-like syntax in Perl,
t/text_wrap.t view on Meta::CPAN
# -*- Mode: Python -*-
# This is a meticolous port of Text::Wrap.
#
# The intention is to test whether an example of real code is processed
# correctly.
#
# It has been written by copying the original code and doing the minimal
# changes for it to be Pythonic, which means colonizing, removing some
# parens, adding a few backslashes, etc. Comments, spacing, and all
# details have been kept.
use Test::More 'no_plan';
use Acme::Pythonic debug => 0;
( run in 0.415 second using v1.01-cache-2.11-cpan-8d75d55dd25 )