| ayrnieu | and how it exports Foo, and how it gets use'd. |
| alobodig | eMish: I'll give that a shot, thanks |
| eMish | ayrnieu, it just defines sub Foo {} |
| dazjorz | and then the pc crashed. |
| xand | noob. what OS is that? |
| ayrnieu | emish - then nothing special happens. |
| eMish | it's rhinocerOs |
| bpalmer` | Hmm, I wonder if the perl vars that are always in package main count as global variables? |
| eMish | ayrnieu, but is that Foo() in the global scope of the code that's including the XYZ ? |
| ayrnieu | emish - no, there is no global scope. Foo is only in XYZ. |
| nanonyme | heh, one reason why it would be bad if you could make hard links to directories would be if some dumbass decided to do ln / /foo/bar and then run find :/ find would go to an infinite loop |
| ayrnieu | emish - the use'er of XYZ can still invoke it through that package, as in XYZ::Foo(@args) |
| eMish | ayrnieu, and if I do 'use XYZ qw{Foo}', then it is usable directly ? |
| bpalmer` | eMish: if the package XYZ is set up as a module, it can automatically "export" that function Foo into the namespace of the thing that did "use XYZ" |
| ayrnieu | nano - logically, you are by that only restricted from having more than one hard link for a directory. |
| eMish | bpalmer`, do you talk about 'exporting' ? |
| bpalmer` | eMish: perldoc Exporter eMish: I do |
| ayrnieu | emish - perldoc perlmod |
| eMish | where can I get 90% of knowledge for 10% of time, please ? |
| ayrnieu | emish - you can look at a few modules off of CPAN. But given how much time you wasted just failing to ask this question, you should read perl's documentation. It's quite good. You'll gain XP, and possibly a level. |
| eMish | but what if i happen to look at shitty modules ? I hear they happen |
| ayrnieu | emish - nothing special will happen in that case. |
| eMish | ayrnieu, why do maintain that there is no global scope in perl ? |
| ayrnieu | emish - because there is not. |
| eMish | is there toplevel scope ? main scope ? |
| ayrnieu | It isn't unusual to lack global scope; even C lacks global scope. |
| eMish | C lacks global scope ? wow that's news |
| ayrnieu | To someone who spends his time not reading documentation, sure. |
| eMish | ayrnieu, does perl has global variables ? |
| ayrnieu | emish - if it had them, it would have global scope. |
| eMish | s/has/have/ perl docs has ~18 times mention of 'global variables' why do you insist they do not exist ? |
| ayrnieu | emish - because they do not. |