Commit 01a94f3
committed
ParseXS: spot MODULE line syntax errors
Previously, a line which was not a completely syntactically correct
MODULE line was not treated as a module line; instead it got passed on
uninterpreted until likely causing an error further along in parsing.
This commit changes things so that anything that looks like the *start*
of a module line is treated as a module line, and is *only then*
examined for full syntactic correctness, giving an error if not ok.
For example: previously, this line:
MODULE = Foo XXXPACKAGE = Foo::Bar
gave the weird error message:
Error: Function definition too short 'MODULE = Foo XXXPACKAGE ...
but now gives the error message:
Error: unparseable MODULE line: 'MODULE = Foo XXXPACKAGE ...
In particular, any line starting with
/^MODULE\s*[=:]/
is now treated as an attempt to declare a module, including the
syntactically incorrect 'MODULE:' form.
This is in the same spirit that other keywords are already processed;
for example
PROTOTYPES: XXXENABLE
is treated as as a badly-formed PROTOTYPES line rather than an otherwise
unrecognised and unprocessed line.1 parent 0e526ab commit 01a94f3
File tree
4 files changed
+111
-24
lines changed- dist/ExtUtils-ParseXS
- lib/ExtUtils
- ParseXS
- t
4 files changed
+111
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
526 | | - | |
527 | | - | |
528 | 526 | | |
529 | 527 | | |
530 | 528 | | |
| |||
674 | 672 | | |
675 | 673 | | |
676 | 674 | | |
| 675 | + | |
677 | 676 | | |
678 | 677 | | |
679 | 678 | | |
680 | 679 | | |
681 | | - | |
682 | | - | |
| 680 | + | |
683 | 681 | | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
684 | 691 | | |
| 692 | + | |
685 | 693 | | |
686 | 694 | | |
687 | 695 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | 373 | | |
389 | 374 | | |
390 | 375 | | |
| |||
646 | 631 | | |
647 | 632 | | |
648 | 633 | | |
649 | | - | |
650 | | - | |
| 634 | + | |
| 635 | + | |
651 | 636 | | |
652 | 637 | | |
653 | 638 | | |
654 | 639 | | |
655 | 640 | | |
656 | | - | |
| 641 | + | |
| 642 | + | |
657 | 643 | | |
658 | 644 | | |
659 | 645 | | |
| |||
783 | 769 | | |
784 | 770 | | |
785 | 771 | | |
786 | | - | |
| 772 | + | |
| 773 | + | |
787 | 774 | | |
788 | 775 | | |
789 | 776 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | | - | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
366 | 371 | | |
367 | 372 | | |
368 | 373 | | |
| |||
588 | 593 | | |
589 | 594 | | |
590 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
591 | 617 | | |
592 | 618 | | |
593 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5701 | 5701 | | |
5702 | 5702 | | |
5703 | 5703 | | |
| 5704 | + | |
| 5705 | + | |
| 5706 | + | |
| 5707 | + | |
| 5708 | + | |
| 5709 | + | |
| 5710 | + | |
| 5711 | + | |
| 5712 | + | |
| 5713 | + | |
| 5714 | + | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
| 5718 | + | |
| 5719 | + | |
| 5720 | + | |
| 5721 | + | |
| 5722 | + | |
| 5723 | + | |
| 5724 | + | |
| 5725 | + | |
| 5726 | + | |
| 5727 | + | |
| 5728 | + | |
| 5729 | + | |
| 5730 | + | |
| 5731 | + | |
| 5732 | + | |
| 5733 | + | |
| 5734 | + | |
| 5735 | + | |
| 5736 | + | |
| 5737 | + | |
| 5738 | + | |
| 5739 | + | |
| 5740 | + | |
| 5741 | + | |
| 5742 | + | |
| 5743 | + | |
| 5744 | + | |
| 5745 | + | |
| 5746 | + | |
| 5747 | + | |
| 5748 | + | |
| 5749 | + | |
| 5750 | + | |
| 5751 | + | |
| 5752 | + | |
| 5753 | + | |
| 5754 | + | |
| 5755 | + | |
| 5756 | + | |
| 5757 | + | |
| 5758 | + | |
| 5759 | + | |
| 5760 | + | |
| 5761 | + | |
| 5762 | + | |
| 5763 | + | |
| 5764 | + | |
| 5765 | + | |
| 5766 | + | |
| 5767 | + | |
| 5768 | + | |
| 5769 | + | |
5704 | 5770 | | |
0 commit comments