1Submethods(3) User Contributed Perl Documentation Submethods(3)
2
3
4
6 Tk::Submethods - add aliases for tk sub-commands
7
9 use Tk::Submethods ( 'command1' => [qw(sub1 sub2 sub3)],
10 'command2' => [qw(sub1 sub2 sub3)]);
11
13 Creates "->commandSub(...)" as an alias for "->command('sub',...)"
14 e.g. "->grabRelease" for "->grab('release')".
15
16 For each command/subcommand pair this creates a closure with command
17 and subcommand as bound lexical variables and assigns a reference to
18 this to a 'glob' in the callers package.
19
20 Someday the sub-commands may be created directly in the C code.
21
22
23
24perl v5.36.0 2023-01-20 Submethods(3)