You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize $^E with the same errno dualvar used by $!, matching Unix
Perl behavior for numeric and string errno contexts.
Add regression coverage for $^E startup, assignment, localization, and
clearing behavior, and update the CPANPLUS progress note with the
resolved File::Copy warning.
Generated with [Codex](https://openai.com/codex)
Co-Authored-By: Codex <codex@openai.com>
Copy file name to clipboardExpand all lines: dev/modules/cpanplus.md
+19-11Lines changed: 19 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,9 @@ EXIT: 0
13
13
14
14
The run also verifies the dependency chain that previously blocked CPANPLUS: `Archive::Extract`, `Object::Accessor`, `File::Fetch`, `Log::Message`, `Module::Loaded`, `Package::Constants`, `Log::Message::Simple`, and `Term::UI`.
15
15
16
-
The only observed remaining issue is a non-fatal warning during CPANPLUS' own suite:
17
-
18
-
```text
19
-
Use of uninitialized value in addition (+) at jar:PERL5LIB/File/Copy.pm line 303.
20
-
```
16
+
The previously observed non-fatal warning during CPANPLUS' own suite is now fixed:
17
+
`$^E` aliases `$!` as a defined errno dualvar, so `File::Copy` can snapshot
18
+
`($! + 0, $^E + 0)` without an uninitialized warning.
21
19
22
20
## Symptom
23
21
@@ -70,6 +68,11 @@ Version checks then exposed decimal vs dotted-version numification differences.
70
68
71
69
The final CPANPLUS blocker was in the generated Makefile for a dummy `Foo-Bar` distribution. When `Makefile.PL` was rerun after `blib/lib` already existed, PerlOnJava's MakeMaker treated staged `blib/lib/*.pm` files as source files. Its generated `pm_to_blib` target could delete `blib/lib/Foo/Bar.pm` and then try to copy that same path back to itself. MakeMaker now prefers real `lib/` sources over stale `blib/` entries and does not stage already-staged files back into `blib`.
72
70
71
+
The last warning-only issue came from `File::Copy` saving both `$!` and `$^E`
72
+
after a failed move fallback. Perl on Unix aliases `$^E` to `$!`; PerlOnJava
73
+
had initialized `$^E` as a plain undef scalar, so numeric `$^E` warned under
74
+
`use warnings`. `$^E` now uses the same `ErrnoVariable` instance as `$!`.
75
+
73
76
## Completed Work
74
77
75
78
- Fixed loop-control parsing in [`OperatorParser.java`](../../src/main/java/org/perlonjava/frontend/parser/OperatorParser.java).
@@ -86,8 +89,10 @@ The final CPANPLUS blocker was in the generated Makefile for a dummy `Foo-Bar` d
86
89
- Added regression coverage in [`version_numify.t`](../../src/test/resources/unit/version_numify.t).
87
90
- Fixed PerlOnJava MakeMaker reruns after `blib/lib` exists so stale staged files are not copied onto themselves.
88
91
- Added regression coverage in [`makemaker_stale_blib_source.t`](../../src/test/resources/unit/makemaker_stale_blib_source.t).
92
+
- Fixed `$^E` to alias `$!` as a defined errno dualvar, matching Unix Perl and removing the `File::Copy.pm line 303` warning.
93
+
- Added regression coverage in [`errno_special_vars.t`](../../src/test/resources/unit/errno_special_vars.t).
89
94
- Verified `Object::Accessor` upstream suite passes: `Files=7, Tests=155, Result: PASS`.
- Verified `./jcpan -t CPANPLUS` passes without the `File::Copy.pm line 303` warning: `Files=20, Tests=1751, Result: PASS`.
91
96
- Verified `make` passes.
92
97
93
98
## Acceptance
@@ -101,14 +106,17 @@ make
101
106
102
107
Before running the full `jcpan -t CPANPLUS` acceptance, make sure no local CPANPLUS distropref is masking the dependency path. A previous investigation generated `/Users/fglock/.perlonjava/cpan/prefs/CPANPLUS.yml`; move it aside or use an isolated CPAN home before judging dependency discovery.
103
108
109
+
Archive::Extract's `.Z` test invokes `/usr/bin/uncompress -c`. In the Codex
110
+
sandbox this can fail with `uncompress: /dev/stdout: Operation not permitted`,
111
+
which prevents CPANPLUS from reaching its own tests. Run the full CPANPLUS
112
+
acceptance outside the sandbox when verifying the `.Z` dependency path.
113
+
104
114
## Next Steps
105
115
106
-
1. Reduce the non-fatal `File::Copy.pm line 303` warning from CPANPLUS' own suite. It appears to come from numeric conversion of `$!` or `$^E` after a failed move fallback, but it does not currently fail CPANPLUS.
107
-
2. Re-run `timeout 1200 ./jcpan -t CPANPLUS` from a fresh or isolated CPAN home before merging if cache independence is required.
108
-
3. Audit whether MakeMaker still needs to discover installable files from `blib/lib`; if it does, keep the new no-self-staging behavior as the regression guard.
109
-
4. Keep CPANPLUS as a regression target when touching `Archive::Extract`, `Object::Accessor`, `ExtUtils::MakeMaker`, parser precedence, or `version`.
116
+
1. Re-run `timeout 1200 ./jcpan -t CPANPLUS` from a fresh or isolated CPAN home before merging if cache independence is required.
117
+
2. Audit whether MakeMaker still needs to discover installable files from `blib/lib`; if it does, keep the new no-self-staging behavior as the regression guard.
118
+
3. Keep CPANPLUS as a regression target when touching `Archive::Extract`, `Object::Accessor`, `ExtUtils::MakeMaker`, parser precedence, `version`, or errno special variables.
110
119
111
120
## Open Questions
112
121
113
-
- Does the `File::Copy` warning reveal a generic `$!` / `$^E` numeric conversion difference when the error variables are unset?
114
122
- Are there CPAN distributions that intentionally rely on MakeMaker installing files that only exist under `blib/lib` after configure/build, and should that path be modeled more explicitly?
0 commit comments