Acme-Playwright

 view release on metacpan or  search on metacpan

Playwright.pm  view on Meta::CPAN

            $temp .= " " . RandomElement( \@pN );
        } elsif ( $chars[ $i + 1 ] eq "o" ) {
            $temp .= " " . RandomElement( \@pO );
        } elsif ( $chars[ $i + 1 ] eq "r" ) {
            $temp .= " " . RandomElement( \@pR );
        } elsif ( $chars[ $i + 1 ] eq "s" ) {
            $temp .= " " . RandomElement( \@pS );
        } elsif ( $chars[ $i + 1 ] eq "t" ) {
            $temp .= " " . RandomElement( \@pT );
        } else {
            $temp .= " " . $rPhrases{ $chars[ $i + 1 ] };
        }
        $out .= $temp . "\n";
    }
    return $out;
}

sub UnMake {
    shift if UNIVERSAL::isa( $_[ 0 ], __PACKAGE__ );
    my $string = shift;
    my $out    = "";
    my @lines  = split ( /\n/, $string );
    foreach my $line ( @lines ) {
        ( $name, $val ) = split ( /: /, $line );
        if ( $name =~ /^\[/ && ! $val ) {
            $out .= "\n";
            next;
        }
        if ( defined $Names{ $name } ) {
            $out .= $Names{ $name };
        }
        if ( defined $Phrases{ $val } ) {
            $out .= $Phrases{ $val };
        }
    }
    return $out;
}

1;
__END__

=head1 NAME

Acme::Playwright - Simple text obfuscation in the form of a play.

=head1 SYNOPSIS

  use Acme::Playwright;
  $play = Acme::Playwright::Make( $string );
  $plaintext = Acme::Playwright::UnMake( $play );
  
  # OR
  
  use Acme::Playwright;
  $ref = Acme::Playwright->new();
  $play = $ref->Make( $string );
  $plaintext = $ref->UnMake( $play );

=head1 DESCRIPTION

To be honest, I did this mostly for the comedy value. I was toying with the idea of making a real steganography module, and the next thing I knew, I was writing Playwright instead. It does offer a degree of security (albeit not a terribly high degree...

=head1 AUTHOR

Kurt Kincaid <sifukurt@yahoo.com>

=head1 SEE ALSO

L<perl>.

=cut



( run in 1.525 second using v1.01-cache-2.11-cpan-39bf76dae61 )