Skip Menu |

This queue is for tickets about the B-Deobfuscate CPAN distribution.

Report information
The Basics
Id: 18876
Status: resolved
Priority: 0/
Queue: B-Deobfuscate

People
Owner: Nobody in particular
Requestors: book [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.10
Fixed in: 0.13



Subject: Acme::MetaSyntactic::RefactorCode is broken with AMS::alphabet
I'm using AMSRC 0.02, and AMS 0.71 with Perl 5.8.8. script.pl is a basic Perl example. $ perl -MAcme::MetaSyntactic::RefactorCode script.pl -t alphabet The symbol dictionary is empty! at /opt/perl/5.8.8/lib/site_perl/5.8.8/B/Deobfuscate.pm line 56 B::Deobfuscate::load_unknown_dict('B::Deobfuscate=HASH(0x8454ff0)') called at /opt/perl/5.8.8/lib/site_perl/5.8.8/B/Deobfuscate.pm line 261 B::Deobfuscate::new('B::Deobfuscate', 'Acme::MetaSyntactic::RefactorCode') called at /opt/perl/5.8.8/lib/site_perl/5.8.8/B/Deobfuscate.pm line 279 B::Deobfuscate::__ANON__() called at (eval 18) line 31 O::CHECK() called at script.pl line 0 eval {...} called at script.pl line 0 CHECK failed--call queue aborted, <DATA> line 1. This does not seem to be related to the fact that AMS::alphabet is an AMS::Locale theme, because other multilingual themes work perfectly. $ perl -MAcme::MetaSyntactic::RefactorCode script.pl -t haddock Loup_garou_a_la_graisse_de_renoncule_de_mille_tonnerres_de_Brest(); sub Loup_garou_a_la_graisse_de_renoncule_de_mille_tonnerres_de_Brest { my($Brute, $Demon, $Judas, $Lache, @Mufle) = @_; foreach my $Papou (@Mufle) { (); } } Worse than that, other alphabet subthemes work correctly: $ LANG=he perl -MAcme::MetaSyntactic::RefactorCode script.pl -t alphabet tsadie(); sub tsadie { my($chet, $resh, $shin, $aleph, @dalet) = @_; foreach my $lamed (@dalet) { (); } } script.pl syntax OK I think it may be possible that it only breaks with replacement variable names that are only 1 character long. I think I have found the culprit: B::Deobfuscate remove all items shorter than 3 characters! In load_unknown_dict(): $p->{'unknown_dict_data'} = [ sort { length $a <=> length $b or $a cmp $b } grep { length > 3 and ! /\W/ and ! exists $k->{$_} } split /\n/, $dict_data ]; If I replace the 3 by 0, this works perfectly. I'll file a bug report to B::Deobfuscate.
Subject: B::Deobfuscate refuses short variable names!
I've been trying to use Acme::MetaSyntactic::RefactorCode (which depends heavily on B::Deobfuscate) with theme alphabet (which contains all the letters of various alphabets). I get the following error, $ perl -MAcme::MetaSyntactic::RefactorCode script.pl -t alphabet The symbol dictionary is empty! at /opt/perl/5.8.8/lib/site_perl/5.8.8/B/Deobfuscate.pm line 56 B::Deobfuscate::load_unknown_dict('B::Deobfuscate=HASH(0x8454ff0)') called at /opt/perl/5.8.8/lib/site_perl/5.8.8/B/Deobfuscate.pm line 261 B::Deobfuscate::new('B::Deobfuscate', 'Acme::MetaSyntactic::RefactorCode') called at /opt/perl/5.8.8/lib/site_perl/5.8.8/B/Deobfuscate.pm line 279 B::Deobfuscate::__ANON__() called at (eval 18) line 31 O::CHECK() called at script.pl line 0 eval {...} called at script.pl line 0 CHECK failed--call queue aborted, <DATA> line 1. Which I traced back to line 53 of Deobfuscate.pm: grep { length > 3 and ! /\W/ and ! exists $k->{$_} } Is it possible to remove this length restriction?
Subject: Re: [rt.cpan.org #18876] B::Deobfuscate refuses short variable names!
Date: Mon, 24 Apr 2006 12:42:37 -0500
To: bug-B-Deobfuscate [...] rt.cpan.org, BOOK [...] cpan.org
From: "Joshua ben Jore" <twists [...] gmail.com>
On 4/22/06, Philippe Bruhat via RT <bug-B-Deobfuscate@rt.cpan.org> wrote: Show quoted text
> > Is it possible to remove this length restriction?
Uh, probably. What do you think of factoring out the dictionary and renaming routines from B::Deobfuscate into a B::"Deparse but rename stuff" module? B::Deobfuscate and your module could then just be users of this B::"Deparse but rename stuff" module, providing their own renaming functions. Would it suit your purposes to have an immediate release of B::Deobfuscate that does as you request and then possible do this other thing that I've proposed at some future time? Josh