This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
06.01-Perl_Pacotes
37 lines (34 loc) · 1.78 KB
/
06.01-Perl_Pacotes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Tabela de Símbolos
Global (main) criada
pelo Perl
%:: my $meu (variáveis com 'my' valem
.---.-------. ^ enquanto durarem seus
| | | | | próprios escopos)
| A | %A:: -:--------. | |
| | | | | |
| | | |
| | | |
| | | |
| B | %B:: -:--------:--------------------------.
| | | ^ ^
| | | %A:: %B::
| | | .---.----. .---.----.
| | | | | | $ | | |
'---'-------' | a | ---:-> | | | | | | | | |
| | | | | | |
| | | '-> | | | | |
| | | | | | | |
| | | | | | | |
| | | | a | | $
| | | | | ---:-> | | | | | |
| | | $ | | | |
| X | ---:-> | | | | | | | | | '-> | |
| | | | | | | | |
'---'----' '-> | | '---'----' | |
| |
| |
Outros pacotes, criados com 'package nome', têm tabelas de
símbolos pŕoprias, criadas como hashes %nome::
Mesmo os hashes dos pacotes são pares key/value do %::
Cada key dos %nome:: tem como 'key' os nomes das variáveis globais,
e os 'values' são os typeglob.