Acme-Buckaroo

 view release on metacpan or  search on metacpan

Buckaroo.pm  view on Meta::CPAN


our @ISA = qw(Exporter);
our %EXPORT_TAGS = ( 'all' => [ ] );
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = ();
our $VERSION = '1.02';

###############################################################################
# IF YOU WANT TO TURN ON DEBUG MODE
# (and thus see lots of logging lines that explain how things are happening
# as they happen), set debug_mode = 1.
# If you do, you'll need either:
#   (1) Perl 5.6 (to get Data::Dumper by default), or
#   (2) to have Data::Dumper already installed.
# Data::Dumper is a very, very handy module, but it wasn't in the default Perl
# installation until (I think) Perl 5.6.  Perl 5.005 usually don't have it.
# Look on CPAN.ORG for Data::Dumper if you don't have it.
###############################################################################
my $debug_mode = 0;
print("starting script...\n") if $debug_mode;

Buckaroo.pm  view on Meta::CPAN

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

sub import
{

    my $first           = shift;     # name of module, in this case "Buckaroo.pm"
    my $source_filename = $0;        # name of file called from (if test.pl does a 'use Acme::Buckaroo;' then this will be "test.pl")

    print("Starting \"Buckaroo\" process...\n") if $debug_mode;

    # set up some hashes to go to/from encoding scheme.
    my $i = 0;
    foreach my $this_elem (@xlate_array)
    {
        $xlate_2_hash{$this_elem} = $i;
        $xlate_from_hash{$i}      = $this_elem;
        $i++;
    }

    if (!(open(FILE_HANDLE, "<$source_filename")))
    {

Buckaroo.pm  view on Meta::CPAN


=head1 DESCRIPTION

The first time you run this program, the entire text of the program
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

Buckaroo.pm  view on Meta::CPAN

=head1 SEE ALSO

Acme::Buffy, Acme::Morse, Acme::Pony, Acme::Bleach, and L<perl>.

=head1 DIAGNOSTICS

=over 4

=item C<Cannot Buckaroo '%s'>

Acme::Buckaroo could not modify the source file.  Are the file permissions set?

=item C<Cannot Buckaroo again on '%s'>

Acme::Buckaroo couldn't read the source file to execute it.  Are the file permissions set?

=back

=head1 AUTHOR

Kevin J. Rice, http://www.JustAnyone.com, E<lt>KevinRice@cpan.orgE<gt>

=head1 COPYRIGHT

Copyright (c) 2002, Kevin J. Rice.  All Rights Reserved. This module is

README  view on Meta::CPAN

    Acme::Buckaroo - Buckaroo Banzai Characters Infest Your Code!


    The first time you run this program, the entire text of the program
    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

README  view on Meta::CPAN


SEE ALSO

    Acme::Buffy, Acme::Morse, Acme::Pony, Acme::Bleach, and L<perl>.

DIAGNOSTICS

    Cannot Buckaroo '%s'

        Acme::Buckaroo could not modify the source file.
        Are the file permissions set?

    Cannot Buckaroo again on '%s'

        Acme::Buckaroo couldn't read the source file for
        whatever reason. Ooops.


AUTHOR

Kevin J. Rice, http://www.JustAnyone.com, E<lt>KevinRice@cpan.orgE<gt>

retest.txt  view on Meta::CPAN

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!!

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

test.pl  view on Meta::CPAN

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!!

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



( run in 0.461 second using v1.01-cache-2.11-cpan-49f99fa48dc )