Acme-Buckaroo

 view release on metacpan or  search on metacpan

Buckaroo.pm  view on Meta::CPAN

    my @in_array = split(//, $in_string);
    $out = Dumper(@in_array);
    print("in_array=>>$out<<\n")  if $debug_mode;

    my $i = 0;
    my @temparray = ();
    foreach my $thischar (@in_array)
    {
        # translate each character into it's ascii value.
        my $num = unpack("c", $thischar);
        # change that ascii value into a string from the array...
        my $newchar = $xlate_array[$num];
        print("char=>>$thischar<<, num=>>$num<<, newchar=>>$newchar<<\n")  if $debug_mode;
        print("char=>>%s<<, num=>>%s<<, newchar=>>%s<<\n", $thischar, $num, $newchar)  if $debug_mode;
        push(@temparray, "$newchar");
        $i++;
        if ($i > 3)
        {
            push(@temparray, "\n");
            $i = 0;
        }

Buckaroo.pm  view on Meta::CPAN

after the 'use Acme::Buckaroo;' is converted (character by character)
into characters from the movie "Buckaroo Banzai Across the Eigth
Dimension" (and some other phrases, too).

The program will work (or not!) exactly as it did before it was
converted, but the code will be a somewhat endearing tribute to a
movie, instead of a clean, complete, clearly commented set of lines
of Perl code.

if you want to convert your program BACK into Perl, you must edit the
Acme::Buckaroo.pm module and turn on debugging (change the
line, "my $debug_mode = 0;" to the line, "my $debug_mode = 1;" and then
run the script again.  As it executes, it will translate the program
back.  Capture the output of this and you have your program back.

Acme::Buckaroo came about because the modules Acme::Buffy, Acme::Morse,
Acme::Pony, and Acme::Bleach were somewhat cryptically written.  This
author believes that CODE SHOULD BE SIMPLE and CLEAR to read and
understand.  Code that isn't clear is far less value.  And, since these
modules are for learning or FUN anyway, I might as well start here.

README  view on Meta::CPAN

    after the 'use Acme::Buckaroo;' is converted (character by character)
    into characters from the movie "Buckaroo Banzai Across the Eigth
    Dimension" (and some other phrases, too).

    The program will work (or not!) exactly as it did before it was
    converted, but the code will be a somewhat endearing tribute to a
    movie, instead of a clean, complete, clearly commented set of lines
    of Perl code.

    if you want to convert your program BACK into Perl, you must edit the
    Acme::Buckaroo.pm module and turn on debugging (change the
    line, "my $debugmode = 0;" to the line, "my $debugmode = 1;" and then
    run the script again.  As it executes, it will translate the program
    back.  Capture the output of this and you have your program back.

    Acme::Buckaroo came about because the modules Acme::Buffy, Acme::Morse,
    Acme::Pony, and Acme::Bleach were somewhat cryptically written.  This
    author believes that CODE SHOULD BE SIMPLE and CLEAR to read and
    understand.  Code that isn't clear is far less value.  And, since these
    modules are for learning or FUN anyway, I might as well start here.

retest.txt  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test;
BEGIN { $| = 1; plan tests => 2 };
#use Acme::Buckaroo;
use Buckaroo;
ok(1); # If we made it this far, we're ok.

#########################

# Insert your test code below, the Test module is use()ed here so read

retest.txt  view on Meta::CPAN

#abcdefghijklmnopqrstuvwxyz
# ABCDEFGHIJKLMNOPQRSTUVWXYZ
#01234567890
#`~1!2@3#$4%%6^7&8*9(0)-_=+\|]]{{]};:"",<.>/?

print "Hello world\\n";
use strict;
BEGIN { unshift \@INC, `pwd` }
use Buckaroo;

# This test script should change so it contains only Buckaroo Banzai words.
# WARNING!! WARNING!! WARNING!! WARNING!!
# WARNING!! WARNING!! WARNING!! WARNING!!
# If you use this module, your source file will be converted into seeming junk
# Though it will still run normally.
# To fix it, go into the module Buckaroo.pm and set $debugmode = 1; and pipe the
# output to a new file.  Remove the use Buckaroo.pm,
# and you're back the way you were.
# WARNING!! WARNING!! WARNING!! WARNING!!
# WARNING!! WARNING!! WARNING!! WARNING!!

test.pl  view on Meta::CPAN

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'

#########################

# change 'tests => 1' to 'tests => last_test_to_print';

use Test;
BEGIN { $| = 1; plan tests => 2 };
#use Acme::Buckaroo;
use Buckaroo;
ok(1); # If we made it this far, we're ok.

#########################

# Insert your test code below, the Test module is use()ed here so read

test.pl  view on Meta::CPAN

#abcdefghijklmnopqrstuvwxyz
# ABCDEFGHIJKLMNOPQRSTUVWXYZ
#01234567890
#`~1!2@3#$4%%6^7&8*9(0)-_=+\|]]{{]};:"",<.>/?

print "Hello world\\n";
use strict;
BEGIN { unshift \@INC, `pwd` }
use Buckaroo;

# This test script should change so it contains only Buckaroo Banzai words.
# WARNING!! WARNING!! WARNING!! WARNING!!
# WARNING!! WARNING!! WARNING!! WARNING!!
# If you use this module, your source file will be converted into seeming junk
# Though it will still run normally.
# To fix it, go into the module Buckaroo.pm and set $debugmode = 1; and pipe the
# output to a new file.  Remove the use Buckaroo.pm,
# and you're back the way you were.
# WARNING!! WARNING!! WARNING!! WARNING!!
# WARNING!! WARNING!! WARNING!! WARNING!!



( run in 0.548 second using v1.01-cache-2.11-cpan-c333fce770f )