Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: ad459fb8e2fe98c74f54da64a333f8bf7c49ebb7 https://github.com/Perl/perl5/commit/ad459fb8e2fe98c74f54da64a333f8bf7c49ebb7 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024)
Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add forgotten fix-up When we discover that a function claimed to have no arg list, actually does have one, we warn and change a boolean to reflect the discovery. But, prior to this commit, the flag remained (incorrectly) set that indicates there was no such list. That doesn't matter with the code as structured now, but it could trip up future code changes. It's best to keep things in a consistent state. Since this function is the final use of this data, and that is unlikely to change, we don't need to change the underlying hash containing the flag value; just the local variable. Commit: ecf9477caa63bff6b6c44c2780e64c7b17175577 https://github.com/Perl/perl5/commit/ecf9477caa63bff6b6c44c2780e64c7b17175577 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Check that exists before dereferencing Commit: 078564ac8cd6feaaec8e24af98abddde9bf1ee0d https://github.com/Perl/perl5/commit/078564ac8cd6feaaec8e24af98abddde9bf1ee0d Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc.pl: Move code from one loop to another This is in preparation for the first loop to be removed in a later commit, but also makes other future commits simpler. Commit: ad0ac7c1ea35cb50d661cc5dc256d5edf7cb7393 https://github.com/Perl/perl5/commit/ad0ac7c1ea35cb50d661cc5dc256d5edf7cb7393 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc.pl: Eliminate a loop Instead the check is done as we go along in another loop. Commit: f9db87516a3ccba006c054b59815837973260516 https://github.com/Perl/perl5/commit/f9db87516a3ccba006c054b59815837973260516 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Change variable name The use of this hash has outgrown its name Commit: ae26bc0f83c717ead7859ef84683d1ce3014a468 https://github.com/Perl/perl5/commit/ae26bc0f83c717ead7859ef84683d1ce3014a468 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Revise sub calling sequence This puts all the data for the function that outputs the generated files into a single structure to be passed to it. This will facilitate future commits not having to have duplicate code for perlapi and perlintern. Commit: 32ba4a5b98ce2f246b75b02fdcc4abc3dc45c8b8 https://github.com/Perl/perl5/commit/32ba4a5b98ce2f246b75b02fdcc4abc3dc45c8b8 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Fix loop terminator The loop should end for any line besides 'apidoc_item', as the comments say. Prior to this commit, only apidoc_section ended it. This hasn't caused problems so far, just an extra trip around the loop typically with no action taken. But future commits will rely on this behaving as documented. Commit: 2f16d4cc4a0855872deb4f127eb9b267a8c77db9 https://github.com/Perl/perl5/commit/2f16d4cc4a0855872deb4f127eb9b267a8c77db9 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Pass in file name, line number to functions These specify where in the source code a line we are processing is found. In one function, the file is already passed in, but the function uses $. for the line number. Future commits will change things so that value won't always be accurate. The other function uses these values to add to the data structure associated with the line. This will enable future commits to give better warnings. Commit: a9b0db65eb34f638aa83e81345e76e73dd7a86a9 https://github.com/Perl/perl5/commit/a9b0db65eb34f638aa83e81345e76e73dd7a86a9 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use enum-like values instead of strings This commit creates some constants to be used as == instead of eq. Commit: 588d7fd3e7d538153fb88637e3476ec883ccb702 https://github.com/Perl/perl5/commit/588d7fd3e7d538153fb88637e3476ec883ccb702 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Consolidate duplicate code By passing more arguments to a function, a duplicate check can be squashed. This looks like overkill, but the next few commits will follow-on, to make things simpler. Commit: a3d770eb89cc1c105dd91e79c5d5372cb7690c43 https://github.com/Perl/perl5/commit/a3d770eb89cc1c105dd91e79c5d5372cb7690c43 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Consolidate more duplicate code By returning some data from a function, a duplicated conditional can be moved into it Commit: 1486edb826a59811b9ba059a1cd395c01b75aa32 https://github.com/Perl/perl5/commit/1486edb826a59811b9ba059a1cd395c01b75aa32 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move some code around This places the calls to two different functions nearly together, in preparation for combining those functions into one. Commit: c294de62f20dbc9e5ec4a2d42708db9d79c662dc https://github.com/Perl/perl5/commit/c294de62f20dbc9e5ec4a2d42708db9d79c662dc Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Rename some variables in a function This makes the next commit smaller Commit: c7a98c84cb5455db6442023d5debf58a72481688 https://github.com/Perl/perl5/commit/c7a98c84cb5455db6442023d5debf58a72481688 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Combine two functions Prior commits have moved the calls to these functions almost adjacent to each other, and made the variable names in each consistent with the other function; now they can be easily merged. They happen to be already sequentially adjacent in the source, so that part is easy. Commit: 2e417c91732177d347bbed00d77cfd8f18e827d4 https://github.com/Perl/perl5/commit/2e417c91732177d347bbed00d77cfd8f18e827d4 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Indent several lines This is in preparation of them being made into part of a new block Commit: 6426b88f7b97ecae46e3a427af4d5fb32015b5e8 https://github.com/Perl/perl5/commit/6426b88f7b97ecae46e3a427af4d5fb32015b5e8 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Slight restructure This changes to remove an early function return, to instead surrounding the code that comes after it with an 'if'. This will be useful in later commits Commit: 5d843bcfb49624eefcf520711025ab78cfa990ec https://github.com/Perl/perl5/commit/5d843bcfb49624eefcf520711025ab78cfa990ec Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move some handling to a common sub This makes things uniform Commit: 266de1ebf157c1bfbe62766cff2723187d96369a https://github.com/Perl/perl5/commit/266de1ebf157c1bfbe62766cff2723187d96369a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Change variable names This standardizes to $input to mean the contents of an input line being examined. I think it is clearer. Commit: 42bfd3772aafb6a6285eddc339c4763f300d5bf1 https://github.com/Perl/perl5/commit/42bfd3772aafb6a6285eddc339c4763f300d5bf1 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Change another variable name I think the new one is clearer Commit: 67f7c7422e8c4e75d9d1e9fc9f8a2e3f4e111821 https://github.com/Perl/perl5/commit/67f7c7422e8c4e75d9d1e9fc9f8a2e3f4e111821 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Rename function and parameter This function will acquire new duties in a future commit, and its parameter is not limited to being a functions; so let the new names reflect that. Commit: 1a5dfc7e6a49e3bc36192d4c3e561d3b7535100a https://github.com/Perl/perl5/commit/1a5dfc7e6a49e3bc36192d4c3e561d3b7535100a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Improve handling of illegal flags This moves the definitions of two classes of flags to near the start of the program. They are somewhat likely to want to be changed by someone who doesn't need to go trying to understand the program. And by complementing the meaning, we can do a s///g, to get all the items that are illegal, instead of before, displaying just one. Commit: 76b49a3d2ea560013bf8fa21dd1b40dcdda60e1a https://github.com/Perl/perl5/commit/76b49a3d2ea560013bf8fa21dd1b40dcdda60e1a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Make two patterns more readable; add flag This is done here by using /xx with white space and sorting the characters in the /[]/ constructs. This also adds the '?' flag to the known list; it is used by Devel::PPPort. Commit: 4340219fb462480dec847db121704b4583974682 https://github.com/Perl/perl5/commit/4340219fb462480dec847db121704b4583974682 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add more flags to what is acceptable to apidoc_item Future commit will want to use some of these new flags; and some are added for completeness This fixes a bug in which a warning message for get_cvn_flags() vwas wrongly added to perlapi Commit: 43ece04cb31bbd0457e79e38bc789785dd7eec34 https://github.com/Perl/perl5/commit/43ece04cb31bbd0457e79e38bc789785dd7eec34 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Keep track of input line number parsing config.h This will be used in the next commit Commit: f48cc95793180e067b1dd9b253877152757b2e21 https://github.com/Perl/perl5/commit/f48cc95793180e067b1dd9b253877152757b2e21 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Improve some error messages This outputs the line number of the error when available, and makes the formats more consistent. Commit: 963986c4179c49cb5ea4bf3003b056b8960700ca https://github.com/Perl/perl5/commit/963986c4179c49cb5ea4bf3003b056b8960700ca Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add new elements to hash These will prove useful in future commits, and the code here is slightly more complicated than immediately necessary, in preparation for those Commit: 3939936bfc8d50215ae8e140b47a21f3a764bbb7 https://github.com/Perl/perl5/commit/3939936bfc8d50215ae8e140b47a21f3a764bbb7 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use function in more places It turns out that two places could use this function, but were repeating the code, not as rigorously. Commit: fd2627361227296f88ae348dce5485aa192238bb https://github.com/Perl/perl5/commit/fd2627361227296f88ae348dce5485aa192238bb Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Do early return if empty input Commit: 6db1cac2e003ff71326d199ff94842967a7b7a8f https://github.com/Perl/perl5/commit/6db1cac2e003ff71326d199ff94842967a7b7a8f Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move function to earlier in file This moves it adjacent to the main place its called. Commit: 1a8b8692bbfd77770c5f82e8b692e2199577d1b1 https://github.com/Perl/perl5/commit/1a8b8692bbfd77770c5f82e8b692e2199577d1b1 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use $variable instead of repeating string const We already had $config_h defined; might as well use it where appropriate instead of 'config.h' Commit: 03fd225ca7d3cef8b9d54b490e0dde59324e4a8a https://github.com/Perl/perl5/commit/03fd225ca7d3cef8b9d54b490e0dde59324e4a8a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Change function name This determines the pod file that is being generated; include that in the name Commit: c83dfe605d9871749eeaf8b6bfe13ed5523764e4 https://github.com/Perl/perl5/commit/c83dfe605d9871749eeaf8b6bfe13ed5523764e4 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move error check This moves it to common code, where it will always get executed. And adds the line number to the output Commit: c486cfc891106f6fa410b5de5e3de6bf69304527 https://github.com/Perl/perl5/commit/c486cfc891106f6fa410b5de5e3de6bf69304527 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Store both raw and munged data This commit causes the flags stored about an API item to be stripped of the ones that are irrelevant to this program. The raw version is kept for debugging. Commit: 83e1ee6c9ed9f01ab9a43fcb7d7d03359361ffb0 https://github.com/Perl/perl5/commit/83e1ee6c9ed9f01ab9a43fcb7d7d03359361ffb0 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Change variable name This value is referring to the generated pod file name. Change the name to indicate that Commit: 11ff0b2bc6de1a6a9f0c51f5d692c0e1d2c2b6e5 https://github.com/Perl/perl5/commit/11ff0b2bc6de1a6a9f0c51f5d692c0e1d2c2b6e5 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move some checks to common function And improve them by including the line numbers; and reorder so we check for fatal error before checking for non-fatal Commit: 9a8a9d306d3b0ecfc07fa9014824d2668daa8131 https://github.com/Perl/perl5/commit/9a8a9d306d3b0ecfc07fa9014824d2668daa8131 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move another error check This moves it to later in the program, when similar checks are being performed, and adds the line number to the message Doing this makes later simplifications possible. Commit: 781315fcec096e3b7b1a5d43d912c28d06842b2f https://github.com/Perl/perl5/commit/781315fcec096e3b7b1a5d43d912c28d06842b2f Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: -M flag implies -m Both mean there is a macro Commit: 938f7ba9854b0789a17dc2cb20413c3ee03b34af https://github.com/Perl/perl5/commit/938f7ba9854b0789a17dc2cb20413c3ee03b34af Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Populate hash differently Instead of creating a new hash with entries filled in, use assignments to fill them. This is in preparation for a future commit which will also use this function to update an existing hash. Commit: 2ffc5084b06bd04f545423790071982307491492 https://github.com/Perl/perl5/commit/2ffc5084b06bd04f545423790071982307491492 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Simplify slightly By changing the return of a function, we can eliminate some special handling Commit: 6e94da29600a1574e2e404f0fcc72f59298f1fc3 https://github.com/Perl/perl5/commit/6e94da29600a1574e2e404f0fcc72f59298f1fc3 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use 'next' to simplify loop This outdents the code in the removed block. Commit: 81ddc26e936063dda28f704853d627476e90b9ea https://github.com/Perl/perl5/commit/81ddc26e936063dda28f704853d627476e90b9ea Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Extract code into separate function This is in preparation for it to be called from more than one place Commit: 6ef36c13af398956eaa3e448c5ec2be00e251ceb https://github.com/Perl/perl5/commit/6ef36c13af398956eaa3e448c5ec2be00e251ceb Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use $name instead of $5 $5 is a capturing group number; we also have that value stored in a variable with a more descriptive name. It is slightly clearer here to use the descriptive name Commit: 102e10ec14eccc5d31f3f9719d0cac14378dc2db https://github.com/Perl/perl5/commit/102e10ec14eccc5d31f3f9719d0cac14378dc2db Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Do early return from function So that the 'die' is the last thing. This also removes a redundant conditional, as $is_in_proper_form has been set false above if $type is ILLEGAL_APIDOC. Commit: b4100a2b1c3bc5de3f5fcf9af4e4b18ac0fd1af0 https://github.com/Perl/perl5/commit/b4100a2b1c3bc5de3f5fcf9af4e4b18ac0fd1af0 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Improve error message This makes it more readable. It also uses an indented HEREDOC, and chomps $input, as its trailing \n interferes with the normal 'die' output. And it adds the line number where the error occurred. Commit: 30df945443b7be8b29f2a9b8f9f862c3c693164a https://github.com/Perl/perl5/commit/30df945443b7be8b29f2a9b8f9f862c3c693164a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move variable into function This should not be used outside the function. Commit: c04eda6a6d9735f94506f48dc7a51c9b71c5905a https://github.com/Perl/perl5/commit/c04eda6a6d9735f94506f48dc7a51c9b71c5905a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Generalize pattern Instead of looking for two explicit values, use \w*. We already check for these two particular values later. This makes it easier to extend in future commits. Commit: 45fada62c076634823e44aa6cc455cb927553daa https://github.com/Perl/perl5/commit/45fada62c076634823e44aa6cc455cb927553daa Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Look for common typos in input lines If someone misspells the apidoc line, it may silently be ignored. Commit 9ade213675268107c9ba13383a2112ba6da71fe9 fixed one such case found by the change in this commit. That change is to be somewhat loose in scanning for an apidoc line, and to die when one is found that isn't in proper form. For example, it handles the case of a missing =for, or using dashes instead of underscores Commit: 8f8681f07f7f0537f63e882e7a5e8335dee3d641 https://github.com/Perl/perl5/commit/8f8681f07f7f0537f63e882e7a5e8335dee3d641 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Centrally handle apidoc_section lines This commit extends the new input line classification function to also look for apidoc_section lines. This will enable the calling code to use this function for all classification instead of doing it in multiple places =head1 lines in C language files have the equivalent effect as apidoc_section lines, so this function transparently handles those, relieving the caller of needing to do that. Basically, this commit completes the process of centralizing into one function, the looking at input lines and deciding what kind they are. Future commits will change to use this function from all the places this is needed. Commit: f67ca74b5fe5b2b7bd2fce49e709ce81dbcfceee https://github.com/Perl/perl5/commit/f67ca74b5fe5b2b7bd2fce49e709ce81dbcfceee Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Special case perlguts apidoc examples Previous commits have extended autodoc to look for typos in apidoc-type lines, and to fail if one is found. (Several such were found and fixed.) But this isn't yet in use on all input lines. The next commits do that. Those exposed an issue in perlguts where apidoc is explained and an example given. This is in a verbatim block, so is indented one space. That would trigger the typo-exposing code and the program would die, complaining about perlguts. This commit makes an exception for perlguts so that an otherwise valid apidoc line that begins in column 1 is treated as not an apidoc line. This confines this kludge to a couple lines in one function. Commit: 1d13660616909dd852d938e521a997991c2d2d03 https://github.com/Perl/perl5/commit/1d13660616909dd852d938e521a997991c2d2d03 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use new function.to classify input line This is the start of using this function to simplify code, by hiding from the mainline the details of figuring out what type of line the input is Commit: d0205e6f68724a5ea85332ebe01b228c21e4f2a7 https://github.com/Perl/perl5/commit/d0205e6f68724a5ea85332ebe01b228c21e4f2a7 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Slight refactor to use input line classification Commit: 21c2bce919263f9325b5bfeb1562523c37bd452b https://github.com/Perl/perl5/commit/21c2bce919263f9325b5bfeb1562523c37bd452b Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Remove value from function return list In one of the two existing cases it is unused, and in the other, the value can be easily derived. Future uses of this function don't need this value. Commit: 190d46c06c512d6b2e9b61e8de471832138501c1 https://github.com/Perl/perl5/commit/190d46c06c512d6b2e9b61e8de471832138501c1 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use input line classification in an additional place Commit: 7266da14db5190f02ca9a2857cdbec613e9c78aa https://github.com/Perl/perl5/commit/7266da14db5190f02ca9a2857cdbec613e9c78aa Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use line classification yet again. And moves to a grab-all 'else' all unknown line types. This protects against logic errors where an unknown classification type happens. Commit: 02bfd76dc6bc341b714e1cee3c9235e56106dc7c https://github.com/Perl/perl5/commit/02bfd76dc6bc341b714e1cee3c9235e56106dc7c Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Reorder elsif clauses Get the easier cases out of the way first Commit: c6201d82e0772f382f1f7d9af2e0ffdbe17274a0 https://github.com/Perl/perl5/commit/c6201d82e0772f382f1f7d9af2e0ffdbe17274a0 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use new classify sub in another place This removes the final place where the apidoc line syntax is needed outside this function. Weird indentation is for future commits. Commit: d684e33f6987b583940795e8d2bf1964e0bf4309 https://github.com/Perl/perl5/commit/d684e33f6987b583940795e8d2bf1964e0bf4309 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Remove redundant call; rename sub Previous calls have made the call to classify_input_line() redundant within this sub. Instead it is called first by all the callers. So pass its results to the sub. And this sub has consequently lost its 'checking' functionality. So rename it to reflect that. Commit: 230a1141fff33a799b518f15c6b922333c4267f3 https://github.com/Perl/perl5/commit/230a1141fff33a799b518f15c6b922333c4267f3 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Swap conditional order Get the easier out of the way first. Commit: 8f89039d9bc80f5e894b5e484c2e3ca6245b9b7c https://github.com/Perl/perl5/commit/8f89039d9bc80f5e894b5e484c2e3ca6245b9b7c Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use chomped text in user message Two of these three error messages would have an extra \n when they came up. But classify_input_line() has been called on the input, and it returns a chomped value. Use that Commit: aef44e52420a7976eee983ed0da74fa236068454 https://github.com/Perl/perl5/commit/aef44e52420a7976eee983ed0da74fa236068454 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Make warning fatal Prior to this commit, if there were multiple attempts to declare what the signature for a function was, the final one encountered would override any earlier ones with a warning. But this should actually be an error, except in two circumstances. We should set things up so that the file parsing order doesn't make any difference in the outcome. And that includes only having one definition, with the two exceptions, as documented in the comments in the code added by this commit. Commit: 94bc6a4c504933a77c254dd47ec06ccec89f75b5 https://github.com/Perl/perl5/commit/94bc6a4c504933a77c254dd47ec06ccec89f75b5 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add parameter to a function This is in preparation for future commits which will generalize this function. Commit: 81ac3dd53d63b5726f1b0b209527f512b3c45fec https://github.com/Perl/perl5/commit/81ac3dd53d63b5726f1b0b209527f512b3c45fec Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Store more information about API elements Every potential API element found has a hash describing it (part of a larger hash containing all such elements). Prior to this commit, the only entries allowed for the element-level hashes was the prototype definition. This commit paves the way for the hashes to have fields indicating that pod documentation exists for it, and where in the source that is. We may encounter the documentation lines while parsing the source tree before their corresponding prototype definitions. For such cases, this creates a place-holder entry, to be filled in at the time the prototype is found. Note that this commit merely adds the infrastructure to handle this; the function is still called only with prototype definitions. A future commit will expand the usage. Commit: ca3cae4a17d990ef9460fe72806465997fefcc56 https://github.com/Perl/perl5/commit/ca3cae4a17d990ef9460fe72806465997fefcc56 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use now common sub in more circumstances The previous commit extended check_and_add_proto_defn() to be usable for not just apidoc_defn lines, and embed.fnc entries. It keeps track of if there has been documentation found for any element. This commit now changes to use the function for all elements. Basically, the %elements hash now becomes a database of all the accumulated knowledge about all the items encountered so far. By the end of the parsing, it contains everything needed. Prior to this commit, that the documentation had been found was signalled by deleting the element from %elements. That forced us to have a %seen hash to keep a record that something was deleted; otherwise we wouldn't know if there were multiple entries describing the same element (perhaps inconsistently). And deleting things lost information, potentially prematurely. Now it's all available for whatever purpose until the end of the program. The %seen hash didn't have enough information for consistency checking, for example. The %missing hash was kept as we went along of items that we had documentation for, but weren't expecting any. This commit moves the populating that to the end. This guarantees that the parse order doesn't affect the outcome. A warning is removed by this commit; checking for that issue was added in the previous commit in the lower level function This commit fixes a bug in which the signatures of some macros showed up with NN and NULLOK markers. These are not currently considered part of the API, and are documented as part of embed.fnc. Commit: fe66116f40b590b3b58a6ffc828e7cb1fa8bb1ef https://github.com/Perl/perl5/commit/fe66116f40b590b3b58a6ffc828e7cb1fa8bb1ef Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Avoid unnecessary pattern match This match only is used sometimes. Move it to within a conditional Commit: 0ed0db8fb76cb90be5f1ed61805a3a5faf69f040 https://github.com/Perl/perl5/commit/0ed0db8fb76cb90be5f1ed61805a3a5faf69f040 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Remove empty elsif sequence The previous commit removed the final action if any of these conditionals were true Commit: 0ae5a76201cabea169555927d2c67b0ac6e461e6 https://github.com/Perl/perl5/commit/0ae5a76201cabea169555927d2c67b0ac6e461e6 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move check into function This allows the %seen hash to be removed Commit: 4a8c0b70d11cad593ef3d2ebc4dd18807276281d https://github.com/Perl/perl5/commit/4a8c0b70d11cad593ef3d2ebc4dd18807276281d Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Remove wrong check docout() already correctly handles this case. And this check is wrong, incorrectly suppressing usage lines like PerlInterpreter* PERL_GET_CONTEXT OP * PL_restartop #ifdef USE_STDIO Commit: f6ff1a05c9e9f8d280307b47a4bdc041d5c3934f https://github.com/Perl/perl5/commit/f6ff1a05c9e9f8d280307b47a4bdc041d5c3934f Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add return value from function This will allow future simplifications Commit: 762a4dc65d2b178b5c496cd8c1740c547d2cb685 https://github.com/Perl/perl5/commit/762a4dc65d2b178b5c496cd8c1740c547d2cb685 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use common function to enter config.h data The previous commit allows config.h parsing to be used with that function, entering its data simply into the data base of API elements. This fixes a bug in which several API items from config.h, such as PL_restartop, did not have their usage displayed in perlapi. Commit: 4bb4c228020b1749a67477d61b90eb68b9e89350 https://github.com/Perl/perl5/commit/4bb4c228020b1749a67477d61b90eb68b9e89350 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- perlapi: Vertically align non-pTHX arguments Commit: 00d937bed1dd722693e0651bd5bdcc1369ad98bc https://github.com/Perl/perl5/commit/00d937bed1dd722693e0651bd5bdcc1369ad98bc Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Use refs to tie together hashes Prior to this commit, the %elements hash had entries that contain a superset of what goes into the actual %docs hash used to construct the output. There was code to copy a subset of an element from one hash to the other. This commit changes things so that %docs is populated with references to the leaf nodes in %elements. No further worrying about copying individual fields. That means that changing a leaf in one tree actually is operating on a leaf in the other tree, and things can't get out of sync. And it enables some simplifications. apidoc_item lines inherit values from the group leader plain apidoc. It turns out that this inheritance in some instances was being done prematurely, when the definitions were incomplete. This is solved in this commit by moving all the populating to the end, after everything should have been resolved. This fixes some bugs in apidoc wherein, for example, PerlIO_stderr() was listed as having parameters, whereas it doesn't. Commit: e00ae466f4a66ea5fd1c5958857a2cb31003ccc4 https://github.com/Perl/perl5/commit/e00ae466f4a66ea5fd1c5958857a2cb31003ccc4 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add line number to warning messages The previous commit has made this value available in these places Commit: 6ab5749480181d28b2069b72ec1c43a4dd0718a1 https://github.com/Perl/perl5/commit/6ab5749480181d28b2069b72ec1c43a4dd0718a1 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Remove irrelevant hash Previous commits have rendered this hash as not adding anything beyond the other hashes in the program Commit: a2249b2d72d8c63a5d5840960f87b56ab7d9e59d https://github.com/Perl/perl5/commit/a2249b2d72d8c63a5d5840960f87b56ab7d9e59d Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Refactor final processing A previous commit moved the populating of %missing to the end. This commit dispenses with that hash altogether. By putting this functionality in an expanded loop, the variant handling of perlapi vs perlintern can be combined as just two iterations over the same code Commit: f09e09c46a908ff4d018453f1e063b5094b0282a https://github.com/Perl/perl5/commit/f09e09c46a908ff4d018453f1e063b5094b0282a Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Collapse two identical branches The actual code in these two branches from the same condition has been made identical by previous commits. So now can squash them together Commit: ea71f53670b19a17312c66b2d648d811d8571672 https://github.com/Perl/perl5/commit/ea71f53670b19a17312c66b2d648d811d8571672 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Split a declaration This makes the next commit smaller Commit: 299b35c4ac10929fe3fe5a37f11c011d05843932 https://github.com/Perl/perl5/commit/299b35c4ac10929fe3fe5a37f11c011d05843932 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add function to unget a single line So far, we have been able to get by with using 'redo' to deal with reading the input one line too far. But the next two commits will disrupt that. So this adds a simple way to effectively put back the last line read, so that the next time the get function is called it returns the previously read line. Commit: 797a6fbb7734b4b0ae747d5fe5a423b9e3aec96b https://github.com/Perl/perl5/commit/797a6fbb7734b4b0ae747d5fe5a423b9e3aec96b Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Handle apidoc continuation lines With this commit, it is now possible to have continuation lines on apidoc lines in the source This moves the classification of the input line type into the get line routine. Commit: 19d6b840fd9e94d4d45dca298c171a17dda1313d https://github.com/Perl/perl5/commit/19d6b840fd9e94d4d45dca298c171a17dda1313d Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move code to more logical place API elements may be grouped into similar items that share the same pod. This is done by having a plain apidoc line as the first in the source, then a series of apidoc_item lines to note the rest of the elements in the group. Prior to this commit, the logic was somewhat convoluted by having the same code used to assemble these lines as other things in the input. But by moving the code to the only place where they may occur, things fall into place more naturally. Commit: b9062132195d84cea1c68022f90db45a98082f85 https://github.com/Perl/perl5/commit/b9062132195d84cea1c68022f90db45a98082f85 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Narrow scope of variables Previous commits mean these don't have to be available in as wide a scope as they are. Commit: 5d50147af0fdb778d1134c495b5892a1d1ffeb49 https://github.com/Perl/perl5/commit/5d50147af0fdb778d1134c495b5892a1d1ffeb49 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move some code to a bit later This moves a warning message to after a die. No point warning if going to immediately die for another reason. It allows the removal of a variable that was only used once. And for the use of another variable instead of re-matching a pattern. Commit: 8b6753331827826a8f713e0b6748b8baafcaadcc https://github.com/Perl/perl5/commit/8b6753331827826a8f713e0b6748b8baafcaadcc Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add check that has resolved deferred elements When parsing the source code tree, there may be elements encountered whose definition hasn't been encountered yet. After the parse, these are examined and handled. This commit makes sure that we got them all. Commit: a063a019c5b1026d5072f9f5866a6c5c110d7855 https://github.com/Perl/perl5/commit/a063a019c5b1026d5072f9f5866a6c5c110d7855 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move code to later The location of this code was premature, as one of the values in the conditional could be changed later, affecting the outcome. Move it to after that final recalculation. Commit: f2e318fd74b6b8c642e6a511912608148ccff9a0 https://github.com/Perl/perl5/commit/f2e318fd74b6b8c642e6a511912608148ccff9a0 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move declaration closer to its first use Commit: 1208707fce39672bccecdb2e4d82589b31bdca22 https://github.com/Perl/perl5/commit/1208707fce39672bccecdb2e4d82589b31bdca22 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Move hash initialization This moves this to a more logical place in the code Commit: 154b3020f113add8c4e2ee1d009a464dd522ccd2 https://github.com/Perl/perl5/commit/154b3020f113add8c4e2ee1d009a464dd522ccd2 Author: Karl Williamson <k...@cpan.org> Date: 2024-07-25 (Thu, 25 Jul 2024) Changed paths: M autodoc.pl Log Message: ----------- autodoc: Add documentation; fix white space Compare: https://github.com/Perl/perl5/compare/2463f19365f9...154b3020f113 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications