Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Re: Of Symbol Tables and Globs

by broquaint (Abbot)
on Nov 09, 2002 at 16:02 UTC ( #211653=note: print w/replies, xml ) Need Help??

in reply to Re: Of Symbol Tables and Globs
in thread Of Symbol Tables and Globs

The first should say that the symbol table is created when a symbol in a package is mentioned.
The symbol table is created by the package declaration, which then sets the default package for variables to be declared into for the rest of the lexical scope.
Saying it's created by the package declaration just introduces more rules later, but the general rule would be right in all cases.
How does the package declaration introduce more rules later? I think it keeps things a lot simpler as it is explicitly creating a symbol table, where as referring to variables is implicitly creating a symbol table through auto-vivification.
Indeed, I was never to happy about that particular passage, I'll either try and clear it up or drop it altogether as it isn't terribly important relevant to the rest of the tutorial.
It is a hash; you just said so.
Ah, I did just say so and I shouldn't have because symbol tables are not hashes, they are just accessed like hashes. Will clear that up also.
I would prefer something like, "...use a similar syntax to accessing a hash".
Ok, will clear that up as well. I'll try and make it clear throughout the tutorial that symbol tables and globs are not hashes, just a similiar (or in the case of symbol tables, exact) way of being accessed.
Your error is not due to any protection on symbol tables. Rather, *scalar{FOO} gives undef (rather than a run-time error; go figure) and then the $ dereference gives the error.
That is true indeed, but I was trying to illustrate the point that although they may look like hashes they most certainly are not, will also do my best to clarify that section as well.
1) you imported into globtut package, not main package. 2) the grammar is compound-noun((noun(main package) AND noun(nothing else)), which I don't think is what you meant. A couple typos. missing space, "the the", "callers symbol table", "callers package".
Yes, yes and yes :)

Many thanks for the input!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://211653]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2021-04-11 06:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found