Port Devel::Size for PerlOnJava
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
This is a substantial port: reimplement the XS-based Devel::Size as a pure-Perl module plus a Java runtime implementation inside PerlOnJava, following the project's existing module-registration pattern (look at how other bundled CPAN modules are registered). Start by running a minimal use Devel::Size qw(size total_size) to see the lookup failure, then study an existing small module port for the wiring, and adapt upstream 0.87 tests (cycle, shared-reference, export-tag cases) as project-owned tests run on both backends. Done means the acceptance criteria pass on JVM and interpreter backends; this needs real familiarity with the PerlOnJava runtime, so it suits a contributor who already knows the codebase rather than a first-timer.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Port Devel::Size for PerlOnJava so CPAN modules that use it as a runtime dependency can load and estimate Perl object sizes on the JVM and interpreter backends.
Devel::Size is currently absent from PerlOnJava's bundled modules. A minimal use fails during module lookup:
use Devel::Size qw(size total_size);
The missing module blocks consumers that declare it as a runtime prerequisite. One concrete consumer observed during CPAN testing is DBG 0.4.1.
Upstream behavior and expected API
The current CPAN release is Devel-Size 0.87, released 2026-03-31. Its Perl wrapper exports size and total_size on request (and via the :all tag), and exposes $Devel::Size::warn and $Devel::Size::dangle controls. The implementation currently loads XS and traverses Perl values, including aggregate/reference structures.
On PerlOnJava, size($value) should return a useful estimate for the value's PerlOnJava representation, and total_size($value) should estimate the reachable structure while counting shared referents once and handling cycles. Estimates should be stable enough for comparisons and diagnostics, but need not match Perl's C allocator byte-for-byte. The module should load without XS and work on both execution backends.
Porting scope
- Add a bundled
Devel::SizePerl module and Java runtime implementation, following the existing PerlOnJava module-registration pattern. - Traverse PerlOnJava runtime values and account for scalars, arrays, hashes, references, code/glob-like values where supported, shared references, and cyclic graphs.
- Preserve the documented exports and warning/dangling-reference controls where applicable; document any deliberate limitations of the Java object model.
- Adapt the upstream tests as project-owned tests, including recursion/cycle and shared-reference cases, and run them on system Perl before relying on them for PerlOnJava behavior.
- Document that these values estimate PerlOnJava-managed object footprints, not process RSS or exact native Perl allocation sizes.
Reverse-dependency estimate
MetaCPAN's reverse-dependency endpoint currently reports 24 distinct distributions mentioning Devel::Size across prerequisite phases. Filtering the latest release metadata to direct runtime requires gives an estimated 22 direct runtime dependants; 6 of those latest releases were updated in the two years before 2026-10-24. These are distribution-level metadata counts, not a count of active users or all transitive consumers. The runtime dependants include diagnostic, profiling, benchmark, GUI, and application distributions.
Sources: MetaCPAN reverse dependencies API and MetaCPAN API documentation.
Acceptance criteria
use Devel::Size qw(size total_size)succeeds without an installed nativeDevel::Sizeon both JVM and interpreter backends.sizeandtotal_sizereturn non-negative numeric estimates for supported values; aggregate size grows as contained data grows.- Shared referents are not counted repeatedly by
total_size, and cyclic structures terminate. - Export/tag behavior and documented controls have focused regression coverage, with unsupported behavior documented.
- The adapted project-owned tests pass with system Perl as an oracle where the semantics are standard Perl behavior, and on both PerlOnJava backends.
Related: #1873 (a separate FileHandle/IO::Seekable porting issue whose CPAN investigation also encountered this missing prerequisite).
- Lenguaje dominante
- Perl
- Estrellas
- 65
- Forks
- 8
- Merge medio
- 6 h 5 min
- PR fusionados (30 d)
- 186
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fglock/PerlOnJava
-
area:runtime documentation enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fglock/PerlOnJava#1579 ·
Los mantenedores suelen responder en 1 día
-
Fix XML::LibXSLT output mismatch in HTML::ToDocBook transformsPosiblemente ocupada @fglock la tomó hoy. Abiertoarea:cpan-port bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
fglock/PerlOnJava#1892 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Short-circuit expressions leak list context through scalar prototypesPosiblemente ocupada @fglock la tomó hoy. Abiertoarea:parser bug
Dificultad 4/5 1-2 días Aptitud para principiantes 55/100
fglock/PerlOnJava#1891 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
fglock/PerlOnJava#1885 ·
Los mantenedores suelen responder en 1 día
-
area:performance enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
fglock/PerlOnJava#1863 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de fglock/PerlOnJava
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
✏️ Editing - Tags
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
openfoodfacts/openfoodfacts-server#15127 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
FIDO2 (ecdsa-sk / ed25519-sk) ingress keys rejected: missing in get_supported_ssh_algorithms_listAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ovh/the-bastion#695 ·
-
Range length wrong when an abbreviated range end contains a 0 (`pages = {315-20}` gives `\range{pages}{11}`)Posiblemente ocupada @plk la tomó hace 2 días. AbiertoBug fixedindev
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
virtualmin/virtualmin-nginx#89 · 1 comentario ·