| Acme-MetaSyntactic-RefactorCode documentation | Contained in the Acme-MetaSyntactic-RefactorCode distribution. |
Acme::MetaSyntactic::RefactorCode - Theme and refactor your code!
Version 0.05
Acme::MetaSyntactic::RefactorCode helps you give signicant variable names to your code.
The default (loremipsum theme) way to use it is:
perl -MAcme::MetaSyntactic::RefactorCode script.pl > loremipsumed.pl
Or the themed version:
perl -MAcme::MetaSyntactic::RefactorCode script.pl -t theme > themed.pl
Take special care to choose a theme that has sufficient entries to refactor your code. Use this one-liner to get available themes:
perl -MAcme::MetaSyntactic -e 'print join "\n",Acme::MetaSyntactic->themes'
Make your code special, using the theme of your choice available from the great
Acme::MetaSyntactic by BooK.
This function is automatically called at import time, and uses
O::Deobfuscate and B::Deobfuscate::Dict::RefactorCode to rewrite
the code with the theme specified with the -t CLI option.
Jerome Fenal, <jfenal@free.fr>
AMSRC will explode if using a theme that has no sufficient entries for your code.
B::Deobfuscate seems also to have problems with big code chunks (tried it on the future 0.02 Solaris::Disk::SVM), some methods calls not being translated.
Please report any other bugs or feature requests to
bug-acme-metasyntactic-refactorcode@rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-MetaSyntactic-RefactorCode.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
Heavily (completely) based on the idea and the code of Acme::Floral by Joshua b. Jore.
This module could not have happened without the Acme::MetaSyntactic module by Philippe "BooK" Bruhat.
Many thanks to Adriano Ferreira who sent a patch to make AMSRC work under newer version of B::Deobfuscate. See RT at http://rt.cpan.org/Ticket/Display.html?id=23700 for full details.
Copyright 2005 Jérôme Fenal, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Acme-MetaSyntactic-RefactorCode documentation | Contained in the Acme-MetaSyntactic-RefactorCode distribution. |
package Acme::MetaSyntactic::RefactorCode; use warnings; use strict; use B::Deobfuscate 0.14; use Acme::MetaSyntactic; use Getopt::Std;
our $VERSION = '0.05';
BEGIN { our ( $opt_t ); getopt('t:'); $opt_t = "loremipsum" if not Acme::MetaSyntactic->has_theme($opt_t); $B::Deobfuscate::Dict::RefactorCode::theme = $opt_t; }
sub import { require O; O->import( 'Deobfuscate', '-DRefactorCode', @_ ); }
1; # End of Acme::MetaSyntactic::RefactorCode