New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BBC: Blead Breaks HTML::Mason #20291
Comments
I have reproduced this breakage by building perl at 5d56ab3 and attempting to install HTML::Mason against it. The breakage in
The failing test looks like this:
I have not bisected, but I strongly suspect this failure is associated with eb54d46.
@demerphq, can you take a look? |
Bisection has confirmed that this is the first bad commit.
|
Executive summary: Not a bug in perl. HTML::Mason::Interp doesn't handle that $@ may be a string or an object, depending on whether it fails with a die or not.
This is a tangled web of issues. The summary is that this may highlight a bug in Perl, but it does not highlight a bug in the "stop on first error". This bug may be demonstrated by modifying the code to contain 10 (or 11, it seems to vary depending on the specific errors encountered) errors instead of 1 even on older perls. The difference between 10 and 1 is that if the compiler "runs out of source code" with less than 10 errors inside of an `eval STRING`, the compilation fails, and the compilation error is appended to `$@`, but crucially, `$SIG{__DIE__}` is NOT triggered. With 10 errors in older perls `$SIG{__DIE__}` *will* be triggered. In newer perl's the first syntax error triggers a croak, which triggers `$SIG{__DIE__}`.
This in turn exposes a bug in
When eval compilation fails with a die (Perl_croak internally) then However the point here for me is that if I change the test so that compilation /dies/ instead of "running off the end of source before encountering enough compilation errors" for instance with this change to
you will see the same failure. If I then change the concatenation to be:
the error will go away. It wont be entirely fixed, this just avoids the concatenation if there is no warning. But if the code ALSO warned, it would still fail test. Eg,
would fail again. So basically, the "stop on first error" fix exposes the fact that This then exposes the fact that the code in HTML::Mason::Interp improperly joins a warning string with an exception object when Now, whether However, this also means that this is a long existent bug and does not have to be fixed with haste. The stop on first error just exposes the issues more clearly, but it did not cause them. The underlying perl issue can be seen here:
compare with:
Notice the
and IMO this ticket should be closed and a ticket created for the underlying HTML::Mason bug, it clearly does not handle a preexisting mode of behavior that will now be more common. We should open a new ticket that |
I have submitted a naive p.r. to HTML-Mason to get the failing test to pass: |
Fixed upstream; see https://metacpan.org/dist/HTML-Mason. Closing ticket. Thanks. |
This is a bug report for perl from "Carlos Guevara" carlos@carlosguevara.com,
generated with the help of perlbug 1.43 running under perl 5.37.4.
BBC: Blead Breaks HTML::Mason
Please see http://matrix.cpantesters.org/?dist=HTML::Mason
Flags
Perl configuration
The text was updated successfully, but these errors were encountered: