Acme-BottomsUp
view release on metacpan or search on metacpan
Acme-BottomsUp
Write individual statements backwards
use Acme::BottomsUp;
@arr # first, start w/ numbers
grep { $_ % 2 } # then get the odd ones
map { $_**3 } # then cube each one
join ":", # and glue together
print # lastly, display result
;
print "ok";
no Acme::BottomsUp;
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
lib/Acme/BottomsUp.pm view on Meta::CPAN
=head1 SYNOPSIS
my @arr = (1..10);
use Acme::BottomsUp;
@arr # first, start w/ numbers
grep { $_ % 2 } # then get the odd ones
map { $_**3 } # then cube each one
join ":", # and glue together
print # lastly, display result
;
print "ok";
no Acme::BottomsUp;
=head1 DESCRIPTION
This module allows you to write multi-line perl statements in reverse order so that it "reads better". For example, normally one would write the code from the SYNOPSIS as:
my @arr = (1..10);
print # lastly, display result
join ":", # and glue together
map { $_**3 } # then cube each one
grep { $_ % 2 } # then get the odd ones
@arr # first, start with numbers
;
=head1 PREREQUISITES
=over 4
( run in 1.300 second using v1.01-cache-2.11-cpan-de7293f3b23 )