NAME

Acme::PlayCode::Plugin::ExchangeCondition - Play code with exchanging condition

SYNOPSIS

use Acme::PlayCode;

my $app = Acme::PlayCode->new( io => $filename );
# or
my $app = Acme::PlayCode->new( io => \$code );

$app->load_plugin('ExchangeCondition');

my $code_played = $app->run;

DESCRIPTION

if ( $a eq "a" ) {
    print "1";
} elsif ( $b eq 'b') {
    print "2";
} elsif ( $c ne qq~c~) {
    print "3";
} elsif ( $c eq q~d~) {
    print '4';
}

becomes

if ( "a" eq $a ) {
    print "1";
} elsif ( 'b' eq $b ) {
    print "2";
} elsif ( $c ne qq~c~) {
    print "3";
} elsif ( q~d~ eq $c ) {
    print '4';
}

SEE ALSO

Moose, PPI, MooseX::Object::Pluggable

AUTHOR

Fayland Lam, <fayland at gmail.com>

COPYRIGHT & LICENSE

Copyright 2008 Fayland Lam, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.