Add CPAN Phases 1 & 2: Socket, Archive::Tar, Net::FTP, and more#312
Merged
Conversation
New modules: - DirHandle: directory handle OO interface (imported via sync.pl) - Dumpvalue: debugging value dumper (imported via sync.pl) - Sys::Hostname: hostname retrieval using syscall New operators: - flock(): file locking with LOCK_SH/LOCK_EX/LOCK_UN/LOCK_NB - syscall(): system calls (SYS_gethostname support) Bug fixes: - Symbol::gensym() now returns glob reference (not glob) for bless - Parser: keywords after '::' no longer parsed as package name part Design document: dev/design/cpan_client.md Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
New modules (imported via sync.pl):
- IO::Socket, IO::Socket::INET, IO::Socket::UNIX - OO socket interface
- IO::Zlib - Compressed I/O for gzip files
- Archive::Tar - Tar archive handling
- Net::FTP, Net::Cmd, Net::SMTP, Net::POP3, Net::NNTP - Network clients
- Tie::StdHandle - Required by IO::Zlib
- File::Spec platform modules - Required by Archive::Tar
Socket enhancements:
- Added $VERSION to Socket.pm
- Added 20+ socket constants (INADDR_*, IPPROTO_*, SHUT_*, etc.)
Bug fixes:
- Parser: @{${...}} nested dereference now works in push/unshift
- Archive::Tar::Constant: GZIP_MAGIC_NUM regex octal to hex workaround
Design document: dev/design/cpan_client.md updated
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <noreply@cognition.ai>
In Perl regex: - \1 through \9 (single digit) are ALWAYS backreferences - \10 and above with all octal digits (0-7) are ALWAYS octal escapes - Examples: \10, \77, \123, \213, \377 are all octal, not backreferences This fixes Archive::Tar which uses \037\213 (gzip magic number) in patterns. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Create SysHostname.java with ghname() using InetAddress.getLocalHost() - Fix XSLoader::load() to use caller() when no argument provided - Eliminates 'Can't load Java XS module' warning for Sys::Hostname Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
- Mark completed modules: DirHandle, Sys::Hostname, Archive::Tar, Net::FTP, IO::Socket, Dumpvalue - Mark flock() as implemented - Add SysHostname.java and XSLoader changes to files list Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
The previous change incorrectly stopped parsing variable names when identifiers that happen to also be keywords (like 'x', 'and', 'isa', 'if', etc.) appeared after '::'. This broke valid Perl like: - $main::x - $Foo::and - &UNIVERSAL::isa In Perl, keywords CAN be used as identifiers in fully qualified package variable names. Fixes test regressions in: - op/sub.t (42 tests restored) - mro/method_caching.t (31 tests restored) - op/goto-sub.t (15 tests restored) - test_pl/can_isa_ok.t (14 tests restored) Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
… File::Spec::Unix - Add Symbol.pm wrapper that loads the XS module without depending on Exporter - Remove `use constant` declarations from File/Spec/Unix.pm that were causing cascading dependency failures when tests cleared %INC This fixes comp/require.t and io/through.t regressions where clearing %INC caused Symbol.pm (and its dependencies) to fail loading because @inc was modified to not include JAR paths. Fixes: - comp/require.t: 51 → 1743 tests restored - io/through.t: 164 → 942 tests restored Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Implement Perl's actual disambiguation rules from perlrebackslash: 1. Single digit (\1-\9) is always a backreference 2. Leading zero (\0xx) is always octal 3. Multi-digit number N: backreference if N <= capture groups seen, otherwise octal (if all digits are 0-7) Examples: - \100 with 100 capture groups -> backreference to group 100 - \100 with 0 capture groups -> octal 100 = @ - \037 with 0 capture groups -> octal 037 (used in Archive::Tar) This fixes the re/pat.t regression where tests 1048-1049 failed because \100 was incorrectly treated as octal even when 100 capture groups existed. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
Add Symbol.pm to sync config - it's a pure Perl module that provides gensym and qualify_to_ref. This is needed by constant.pm which is used by File::Spec::Unix.pm. Reverted File::Spec::Unix.pm to CPAN version (with use constant). Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <noreply@cognition.ai>
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.
Summary
Phases 1 & 2 of CPAN client dependencies - adds networking, archive handling, and related modules.
Phase 1: Low-hanging Fruit
Phase 2: Archive/Network Modules
Bug Fixes
Symbol::gensym()now returns glob reference for bless::no longer parsed as package name@{${...}}nested dereference now works in push/unshiftDesign Document
dev/design/cpan_client.mdwith full dependency analysis and roadmap.Test Plan
./jperl -e 'use IO::Socket; ...'- works./jperl -e 'use Archive::Tar; ...'- works./jperl -e 'use Net::FTP; ...'- works./jperl -e 'use IO::Zlib; ...'- worksGenerated with Devin