fix: remove dead code from String.pm and fix Ephemeral.pm init bug#48
Open
toddr-bot wants to merge 1 commit into
Open
fix: remove dead code from String.pm and fix Ephemeral.pm init bug#48toddr-bot wants to merge 1 commit into
toddr-bot wants to merge 1 commit into
Conversation
…n Ephemeral.pm Remove 10 functions from String.pm that are never called from anywhere in the codebase. Two of them (hash2str/str2hash) called undefined escape()/unescape() functions and would crash if ever invoked. Others include debug utilities, an unused MIME::Parser wrapper, and hash2hexbits which had a "fixme needs testing" comment since 2005. Clean up @export to remove references to deleted functions and the never-defined prehash. Initialize $rv in Ephemeral.pm encode_separator() to avoid "use of uninitialized value" warning under use warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Remove 10 dead functions from String.pm (-160 lines) and fix an uninitialized variable in Ephemeral.pm.
Why
String.pm carried 10 functions that are never called from anywhere in the codebase — not from lib/, bin/, or tests. Two of them (
hash2str/str2hash) call undefinedescape()/unescape()functions and would crash immediately if invoked.hash2hexbitshas a "fixme needs testing" comment from 2005.dump_entitydepends on commented-outMIME::Parserand has unreachable code after areturn. Theprehashsymbol was listed in@EXPORTbut never defined as a function.How
printb64table,hmac3_sha1,escape_smtp_terminator,unescape_smtp_terminator,hex_dump,hash2str,str2hash,dump_entity,hash2hexbits,clean_body@EXPORT: removedhex_dump,printb64table,prehash(the latter was never defined)#use MIME::Parser(only consumer was the deleteddump_entity)$rvinitialization inEphemeral.pm::encode_separator()to avoid "uninitialized value" warningTesting
Full test suite passes: 182 tests across 8 test files. All remaining exported functions (
hmac_sha1,xor_key,hextobase64,base64tohex,makesis,parsesis,makesis_nue,parsesis_nue,to_batched_query,from_batched_query,findsimilar,prep_mail,hexbits2hash,hmac2_sha1,randstr,round,debugobj,fisher_yates_shuffle) are verified working.🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 2 insertions(+), 162 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline