Re: Classes as modules?

2006-01-11 Thread Foo Ji-Haw
Well, the two files in question are not huge. They each have one class. What's the difference between require-ing them later, and use-ing them later? Why is it more difficult to require them? I don't think it's more difficult to call a require(), use() helps in the bigger scheme of thin

Re: Classes as modules?

2006-01-11 Thread Chris Wagner
At 03:19 PM 1/11/2006 -0800, Lyle Kopnicky wrote: >Well, that's what I have right now. Two packages, each in their own >file. Each one is a class. But they are '.pl' files. Is there any >reason to make them '.pm' files? I don't see why I would want to export >anything from them. Then I gue

Re: Classes as modules?

2006-01-11 Thread Lyle Kopnicky
Foo Ji-Haw wrote: OK, looking at 'perlnewmod', it has a section called 'What should I make into a module?', which states: "You should make a module out of any code that you think is going to be useful to others." That settles my question. The classes I have written for this project are

Re: Classes as modules?

2006-01-11 Thread Lyle Kopnicky
DZ-Jay wrote: On Jan 7, 2006, at 03:49, Lyle Kopnicky wrote: Doesn't that just let me import the methods of the class into my own namespace, from another file? That would be weird - they're supposed to be methods of a class. They belong in the class' namespace, not mine. They won't be

Re: Classes as modules?

2006-01-11 Thread Chris Wagner
At 11:56 AM 1/10/2006 -0800, Lyle Kopnicky wrote: >OK, looking at 'perlnewmod', it has a section called 'What should I make >into a module?', which states: > >"You should make a module out of any code that you think is going to be >useful to others." Here's my philosophy on modules. If ur using