in reply to Why does Perl have typeglobs?
For example, the following adds bar to the symbol table after Mod.pm has been executed.
use Mod; sub bar { ... } ...
Perl doesn't have to expose the type globs to the program, but it makes some incredible things possible. A simple example is aliasing a sub.
sub foo { ... } *Foo = \&foo; # Create alias for backwards compatibility.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why does Perl have typeglobs?
by Anonymous Monk on Jul 08, 2014 at 21:21 UTC | |
by ikegami (Patriarch) on Jul 08, 2014 at 21:33 UTC | |
by Anonymous Monk on Jul 08, 2014 at 22:15 UTC | |
by Anonymous Monk on Jul 08, 2014 at 22:45 UTC |