summaryrefslogtreecommitdiff
path: root/Master/tlpkg/doc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-04-27 22:42:51 +0000
committerKarl Berry <karl@freefriends.org>2011-04-27 22:42:51 +0000
commitb82296f4b89901e7b41f2ea8da56222f72a19aa3 (patch)
tree6c979f8138cab3590d8f5b7ea46c55167e8ff8a3 /Master/tlpkg/doc
parent32894c90493383140e5d86808080326acb3d2a05 (diff)
doc updates
git-svn-id: svn://tug.org/texlive/trunk@22225 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/doc')
-rw-r--r--Master/tlpkg/doc/coding-style.txt14
1 files changed, 6 insertions, 8 deletions
diff --git a/Master/tlpkg/doc/coding-style.txt b/Master/tlpkg/doc/coding-style.txt
index 6a98ecc77a8..e2637edfde8 100644
--- a/Master/tlpkg/doc/coding-style.txt
+++ b/Master/tlpkg/doc/coding-style.txt
@@ -13,8 +13,7 @@ our variables, etc., and then:
exit (&main ());
-sub main
-{
+sub main {
...
return 0;
}
@@ -34,22 +33,21 @@ the regex includes a /, use ",". When it includes both "/" and ",", use "!".
top-down rather than bottom-up. So main would come first.
-* Indent by two spaces and put the function-opening { in column 1 (as above),
+* Normal indentation is two spaces per level.
Put a space between arguments of function calls.
Karl puts a space before the ( of function calls but no one else does :).
* Handle subroutine arguments like this:
-sub foo
-{
+sub foo {
my ($arg1,$arg2,@rest) = @_;
...
}
Use this in preference to `shift' even when there is only one argument.
It takes up only one line, which is good. And if the number of
-arguments to the function changes, text changes are minimized.
+arguments to the function later changes, text changes are minimized.
* It looks strange to write hash keys as if they were keywords (although
@@ -92,7 +90,7 @@ In contrast, EXPORT_OK should list all the "public" symbols (but not
private ones) of a module. It is good to list them in the same order as
they are defined in the file, since that both makes it obvious where a
new symbol should be added, and provides a sort of check that all and
-onyl the right symbols are there. The EXPORT symbols need not and
+only the right symbols are there. The EXPORT symbols need not and
should not be listed again in EXPORT_OK.
Then, use TeXLive::SomeModule;
@@ -111,7 +109,7 @@ brains tend to think of as "local".
If you want to import every single EXPORT_OK symbol,
use TeXLive::SomeModule (/./);
should do it (I've never actually tried it). This is certainly far
-better than explicitly listing every symbol yet again.
+better than explicitly listing every symbol again.
Documentation:
http://search.cpan.org/~ferreira/Exporter-5.63/lib/Exporter.pm