Acme::Greek - Acme::Greek documentation


Acme-Greek documentation Contained in the Acme-Greek distribution.

Index


Code Index:

NAME

Top

Acme::Greek - Ιτ'σ αλλ γρεεκ το με!

VERSION

Top

Version 1.0

SYNOPSIS

Top

Tired of co-workers complaining that your code is "all greek to them"? Need to send your perl to the local mathematician for review? Look no further than Acme::Greek, which will greek-ify your code but still be executable.

Example:

     use Acme::Greek;
     print "Hello, world.\n";

When you run this program, it will greek-ify itself:

     use Acme::Greek;
     πριντ "Ηελλο, ςορλδ.\ν";

This might not look like valid perl, but it is. Run the program again, and it prints:

    Hello, world.

AUTHOR

Top

Jonathan Rockway, <jrockway at cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-acme-greek at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-Greek. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Top


Acme-Greek documentation Contained in the Acme-Greek distribution.
package Acme::Greek;
use strict;
use utf8;

my $latin  = q{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz};
my $greek  = q{ΑΒΨΔΕΦΓΗΙΞΚΛΜΝΟΠQΡΣΤΘΩWΧΥΖαβψδεφγηιξκλμνοπqρστθωςχυζ};

sub encode {$_ = shift; eval "tr/$latin/$greek/"; $_}
sub decode {$_ = shift; eval "tr/$greek/$latin/"; $_}
open 0 or print "can't encode '$0'\n" and exit;
binmode 0, ':utf8';
(my $code = join '', <0>) =~ s/^\s*use\s+Acme::Greek\s*;\s*//ms;
do {eval decode $code; exit;} if $code =~ /[$greek]/;
open 0, ">$0" or print "ψαν'τ ενψοδε '$0'"; 
binmode 0, ':utf8';
print {0} "use Acme::Greek;\n", encode $code and exit;

our $VERSION = '1.0';