stub
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | stub [2006/08/29 20:18] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: stub.txt,v 1.5 2006/08/29 18:22:56 sthalik Exp $ | ||
+ | |||
+ | ======Synopsis: | ||
+ | __stub__ alias|assign < | ||
+ | |||
+ | ======Description: | ||
+ | The __STUB__ allows you to set up a load-on-demand alias or assign. | ||
+ | You may __STUB__ any alias or variable name to a filename. | ||
+ | stubbed alias or variable name is looked up, the stub is deleted, and | ||
+ | the lookup is interrupted while the filename to which the alias is stubbed | ||
+ | is loaded. | ||
+ | that is loaded does not actually define a real value for the alias or | ||
+ | assign, then after the load the alias or assign is treated as any other | ||
+ | undefined value. | ||
+ | |||
+ | __STUB__s are automatically deleted whenever they are first used. They | ||
+ | can also be deleted if a real alias or assign value is given to them. | ||
+ | (So for example, you can stub 3 aliases to the same file, and when that | ||
+ | file is loaded, it /[[alias command|aliases]] all 3 of them, so all 3 stubs go away) | ||
+ | |||
+ | __STUB__s can load more than one file at a time. | ||
+ | |||
+ | The idea of using __STUB__s is to shorten load times by not having to | ||
+ | take the time to load files implementing features your script may offer | ||
+ | that the user will never use. If the user does use the feature, then it | ||
+ | is loaded on demand and they never know the difference. | ||
+ | |||
+ | ======Examples: | ||
+ | To load the file foobar.irc when the /foo command is issued: | ||
+ | stub alias foo foobar.irc | ||
+ | | ||
+ | To load footoo.irc when $foo and $bar are accessed: | ||
+ | stub assign foo,bar footoo.irc | ||
stub.txt · Last modified: 2006/08/29 20:18 by 127.0.0.1