Encode-Wechsler
view release on metacpan or search on metacpan
lib/Encode/Wechsler.pm view on Meta::CPAN
my $string = scalar $wechsler->decode( 'xp3_0ggmligkcz32w46' );
=head1 DESCRIPTION
Wechsler encoding is used to describe game boards for Conway's Game of Life.
THIS MODULE IS AN ALPHA RELEASE!
Interface will most likely change. Also, there is no encode() method for this
release. This release only provides decode(). No procedural interface is currently
available but should be in a future release, as well as an encode() method.
(The author's current needs only require decoding.) :D
=head1 METHODS
=over 4
=item C<new( %params )>
my $wechsler = Encode::Wechsler->new();
Constructs object. Accepts the following named parameters:
=back
=over 8
=item * C<pad>
Integer. Ensure resulting game grid has empty cells on all four edges: the top
and bottom rows and left most and right most columns will all be "turned off."
The amount of padding determines how many rows/cols of padding will be added.
my $wechsler = Encode::Wechsler->new( pad => 4 );
Some codes require additional padding in order to sustain properly.
=back
=over 4
=item C<encode( $string or $array_ref )>
Not currently implemented.
=item C<decode( $string )>
Attempts to decode the string argument. Returns a list of array references (2d array)
when called in list context:
my @array = $wechsler->decode( 'xp3_0ggmligkcz32w46' );
Or returns a text representation of the game board in scalar context:
my $string = scalar $wechsler->decode( 'xp3_0ggmligkcz32w46' );
Throws exception if code is invalid.
=back
=head1 BUGS AND LIMITATIONS
Please report any bugs or feature requests to either
=over 4
=item * Email: C<bug-encode-wechsler at rt.cpan.org>
=item * Web: L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Encode-Wechsler>
=back
I will be notified, and then you'll automatically be notified of progress
on your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Encode::Wechsler
The Github project is L<https://github.com/jeffa/Encode-Wechsler>
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker (report bugs here) L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Encode-Wechsler>
=item * AnnoCPAN: Annotated CPAN documentation L<http://annocpan.org/dist/Encode-Wechsler>
=item * CPAN Ratings L<http://cpanratings.perl.org/d/Encode-Wechsler>
=item * Search CPAN L<http://search.cpan.org/dist/Encode-Wechsler/>
=back
=head1 ACKNOWLEDGEMENTS
Pattern notion developed by Allan Wechsler 1992. L<https://catagolue.appspot.com/help/wechsler.txt>
=head1 AUTHOR
Jeff Anderson, C<< <jeffa at cpan.org> >>
=head1 LICENSE AND COPYRIGHT
Copyright 2024 Jeff Anderson.
This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
copy of the full license at:
L<http://www.perlfoundation.org/artistic_license_2_0>
Any use, modification, and distribution of the Standard or Modified
Versions is governed by this Artistic License. By using, modifying or
distributing the Package, you accept this license. Do not use, modify,
or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made
( run in 1.821 second using v1.01-cache-2.11-cpan-39bf76dae61 )