The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Acme::Indent - Proper indentation for multi-line strings

SYNOPSIS

    use Acme::Indent qw(ai);

    my $mini_prog = ai(q^
        my $token = 'B';
        print "Begin test $token\n";

        my $ph = {a => 'abc', z => 'xyz'};
        my @list = qw(a r z);

        while (@list) {
            my $key = shift @list;
            if ($ph->{$key})) {
                print $ph->{$key}, "\n";
            }
        }

        $token = 'E';
        print "End test $token\n";
    ^);

    print "Mini-Prog:\n";
    print "----+----1----+----2----+----3----+----4----+----5----+----6\n";
    print $mini_prog;
    print "----+----1----+----2----+----3----+----4----+----5----+----6\n";

AUTHOR

Klaus Eichner <klaus03@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009-2011 by Klaus Eichner

All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the artistic license 2.0, see http://www.opensource.org/licenses/artistic-license-2.0.php