| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
* Support regcomp.c ckWARN and vWARN macros
* Update pod/perldiag.pod for fixes discovered with new checks
* Allow t/porting/diag.t to match printfs with flags more liberally
|
|
|
|
|
|
| |
Support multi-line "=item ..." expressions per the POD spec.
This also allows warnings with white-space differences to match.
|
| |
|
| |
|
| |
|
|
|
|
| |
I thought I had run it, hmm.
|
|
|
|
|
|
| |
Express the one-liner with qq to interpolating \n to a newline character at
execution time, instead of q quoting a literal newline character. Passing
a literal newline character is not portable to all platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I hope you agree this backtrace does not look very good:
$ ./perl -Ilib -Mdiagnostics -e '
sub foo { bar () }
sub bar { baz() }
sub baz {
die "Attempt to reload foo aborted.\nCompilation failed in require"} foo
'
Attempt to reload foo aborted (#1)
(F) You tried to load a file with use or require that failed to
compile once already. Perl will not try to compile this file again
unless you delete its entry from %INC. See "require" in perlfunc and
"%INC" in perlvar.
Compilation failed in require at -e line 1 (#2)
(F) Perl could not compile a file specified in a require statement.
Perl uses this generic message when none of the errors that it
encountered were severe enough to halt compilation immediately.
Uncaught exception from user code:
Attempt to reload foo aborted.
Compilation failed in require at -e line 1.
main::baz() called at -e line 1
main::bar() called at -e line 1
main::foo() called at -e line 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the ‘Compilation failed’ messages are actually multiline mes-
sages, like "Attempt to reload foo aborted.\nCompilation failed in
require at ...".
perldiag has separate entries for each line of the message, so it
makes sense to have it look up each line. It can’t split it into
lines by default, but must check for a possible description first, as
sometimes syntax errors quote code with line breaks in it.
I had to rip out the nasty file-wide lexical $_, as I couldn’t local-
ise it, and I undid d923656e4 in the process.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently a user-defined error message is printed out like this:
-----
Uncaught exception from user code:
panick: at -e line 1.
at -e line 1
main::baz() called at -e line 1
main::bar() called at -e line 1
main::foo() called at -e line 1
-----
Errors generated from perl itself are printed like this:
-----
panic: at -e line 1 (#1)
(P) An internal error.
Uncaught exception from user code:
panic: at -e line 1.
at -e line 1
main::baz() called at -e line 1
main::bar() called at -e line 1
main::foo() called at -e line 1
-----
By using Carp::confess(), we end up with a screwy backtrace. Some-
times it just ends up repeating the error and line number:
-----
panic: at -e line 1 (#1)
(P) An internal error.
Uncaught exception from user code:
panic: at -e line 1.
at -e line 1
-----
Uncaught exception from user code:
panick at -e line 1.
at -e line 1
-----
This commit cleans these up to print like this:
-----
Uncaught exception from user code:
panick: at -e line 1.
main::baz() called at -e line 1
main::bar() called at -e line 1
main::foo() called at -e line 1
-----
panic: at -e line 1 (#1)
(P) An internal error.
Uncaught exception from user code:
panic: at -e line 1.
main::baz() called at -e line 1
main::bar() called at -e line 1
main::foo() called at -e line 1
-----
panic: at -e line 1 (#1)
(P) An internal error.
Uncaught exception from user code:
panic: at -e line 1.
-----
Uncaught exception from user code:
panick at -e line 1.
-----
You might ask: Why not remove the ‘uncaught exception’ message alto-
gether after an error description. It’s because the error description
is a diagnostic, which only prints once for each error or warning
encountered. So you could have eval { die } somewhere else in the
code, which causes a description to be printed. And later you have a
die() that exits the program, but nothing gets printed.
In other words, the description of the message does not replace
the error.
|
|
|
|
| |
so that runperl is available
|
| |
|
|
|
|
|
|
| |
Update spacing
Don't break S<20 questions> across lines, update test to be accurate
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Commit 96090e4 changed a diagnostic message, but didn't update
lib/diagnostics.t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently have entries in perldiag like this:
=item Code point 0x%X is not Unicode, may not be portable
=item Code point 0x%X is not Unicode, no properties match it; all inverse properties do
(W utf8) You had a code point above the Unicode maximum of U+10FFFF.
...
diagnostics.pm needs to know that the description applies to the first
=item, as well as to the second.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The number of L<foo/bar> links in perldiag has grown over time, and
diagnostics.pm has never been updated to render them nicely, resulting
in output like this:
Lexing code attempted to stuff non-Latin-1 character into Latin-1 input at
lib/diagnostics.t line 36 (#3)
(F) An extension is attempting to insert text into the current parse
(using lex_stuff_pvn_flags|perlapi/lex_stuff_pvn_flags or similar), but
tried to insert a character that couldn't be part of the current input.
This is an inherent pitfall of the stuffing mechanism, and one of the
reasons to avoid it. Where it is necessary to stuff, stuffing only
plain ASCII is recommended.
I’ve implemented some rudimentary L<> parsing, which should suffice
for perldiag. I think using a real POD processor would be overkill.
|
|
|
|
|
|
|
|
|
| |
The message ‘localtime(...) too large’ is not documented in perldiag.
The attached patch adds it. I know it’s technically ‘%s(%.0f) too
large’, but it’s easier for users to find it under ‘localtime’ and
‘gmtime’. I also had to modify diagnostics.pm to support %.0f, and I
added a test, but I used a hack with STDERR that would make debugging
very difficult to anyone else adding tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Big MacPerl Testing Patch No. 2
Big MacPerl Testing Patch No. 3
p4raw-id: //depot/perl@16942
p4raw-integrated: from //depot/macperl@16937 'copy in'
lib/Devel/SelfStubber.pm lib/Devel/SelfStubber.t
lib/File/DosGlob.t lib/File/Path.t lib/File/Spec/t/Spec.t
lib/File/Temp.pm lib/FindBin.t lib/Tie/File/t/09_gen_rs.t
lib/lib.t t/comp/use.t utils/dprofpp.PL utils/splain.PL
(@16123..) t/lib/MakeMaker/Test/Utils.pm (@16230..)
lib/diagnostics.t (@16646..) lib/ExtUtils/t/00setup_dummy.t
lib/ExtUtils/t/Command.t (@16730..) lib/lib_pm.PL (@16926..)
lib/ExtUtils/MM_MacOS.pm lib/Test/Harness/Straps.pm
lib/Test/Harness/t/callback.t
lib/Test/Harness/t/strap-analyze.t
lib/Test/Harness/t/test-harness.t (@16929..)
p4raw-integrated: from //depot/macperl@16926 'merge in' lib/English.t
(@16123..) ext/DynaLoader/DynaLoader_pm.PL (@16868..)
|
|
|
| |
p4raw-id: //depot/perl@16490
|
|
|
|
|
| |
Message-Id: <20010822200300.0D1638253@ool-18b93024.dyn.optonline.net>
p4raw-id: //depot/perl@11726
|
|
No doubt I made some mistakes like missed some files or
misnamed some files. The naming rules were more or less:
(1) if the module is from CPAN, follows its ways, be it
t/*.t or test.pl.
(2) otherwise if there are multiple tests for a module
put them in a t/
(3) otherwise if there's only one test put it in Module.t
(4) helper files go to module/ (locale, strict, warnings)
(5) use longer filenames now that we can (but e.g. the
compat-0.6.t and the Text::Balanced test files still
were renamed to be more civil against the 8.3 people)
installperl was updated appropriately not to install the
*.t files or the help files from under lib.
TODO: some helper files still remain under t/ that could
follow their 'masters'. UPDATE: On second thoughts, why
should they. They can continue to live under t/lib, and
in fact the locale/strict/warnings helpers that were moved
could be moved back. This way the amount of non-installable
stuff under lib/ stays smaller.
p4raw-id: //depot/perl@10676
|