Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.
Huh?
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!

_________
broquaint


In reply to Re: Re: Of Symbol Tables and Globs by broquaint
in thread Of Symbol Tables and Globs by broquaint

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found