PG.pl uses the round function without explicitly loading a package that contains it.

Abierto
#2,565 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
perl
Área
backend

Línea de trabajo

Start with the minimal problem in the issue, which calls the round function from PG.pl line 1097 without loading PGauxiliaryFunctions.pl. Check where round is defined and how other macros expose helpers before choosing a fix, since the issue itself leaves open whether PG.pl should load that file. Done means the MWE shows feedback with no 'Undefined subroutine' warning, and maintainers have agreed on where the helper should live.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Here is a MWE:

DOCUMENT();

loadMacros(
    "PG.pl",
    "PGbasicmacros.pl",
    "PGML.pl",
);

$ans = List("1,2");

BEGIN_PGML
Enter [`1,2`]: [_]{$ans}
END_PGML
ENDDOCUMENT();

Enter "1" in the answer blank and you get the following warning message, and the feedback is not shown for the answer.

ERRORS from post processing PG text:
Undefined subroutine &main::round called at [PG]/macros/PG.pl line 1097

This is because the round function is defined in PGauxiliaryFunctions.pl, which is not loaded by this problem.

This could be solved by having PG.pl load PGauxiliaryFunctions.pl, but it seems wrong to have the core PG macro depend on other macro files.

Lenguaje dominante
Perl
Estrellas
164
Forks
167
Merge medio
6 d 7 h
PR fusionados (30 d)
27

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openwebwork/webwork2

Todos los issues de openwebwork/webwork2

Issues similares

Más issues de Perl

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.