Dirk Bremer wrote:
I have all of the modules that I have created either in the same single
directory that contains the scripts or in sub-directories of the script
directory. I use this in every script:
use FindBin qw($Bin);
use lib $Bin;
I never have any problems no matter where the script is
Chris Wagner wrote:
At 01:44 PM 1/12/2006 -0800, Lyle Kopnicky wrote:
If I put a relative path in @INC, I guess it would be relative to the
current directory. Which is whatever the directory the console is in
when it runs the script. Not very useful for finding modules. Instead
I want t
I have all of the modules that I have created either in the same single
directory that contains the scripts or in sub-directories of the script
directory. I use this in every script:
use FindBin qw($Bin);
use lib $Bin;
I never have any problems no matter where the script is executed from.
Hope th
At 01:44 PM 1/12/2006 -0800, Lyle Kopnicky wrote:
>If I put a relative path in @INC, I guess it would be relative to the
>current directory. Which is whatever the directory the console is in
>when it runs the script. Not very useful for finding modules. Instead
>I want to find a path relative
Chris Wagner wrote:
At 11:13 AM 1/12/2006 -0800, Lyle Kopnicky wrote:
* use() requires that you use a bareword for the module name (might
be nice, if I could solve the @INC path problem)
I don't know why u think u have a @INC problem. There's lots of ways to do
it. use lib "pa
At 11:13 AM 1/12/2006 -0800, Lyle Kopnicky wrote:
>* use() requires that you use a bareword for the module name (might
> be nice, if I could solve the @INC path problem)
I don't know why u think u have a @INC problem. There's lots of ways to do
it. use lib "path", push @INC, path, perl
Foo Ji-Haw wrote:
I don't think it's more difficult to call a require(), use() helps in
the bigger scheme of things, like determining the scope of your
variables and methods, and making sure you package similar functions
together. use() also makes sure at compile time that the libraries are
a
Foo Ji-Haw wrote:
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
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
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
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
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
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
Studying Damian Conway's Object Oriented Perl
http://www.manning.com/books/conway will help
in getting an understanding of Object Oriented
Programming in general (as an abstract concept and
as it is implemented in a few languages) and as it
applies to programming in perl.
--Sures
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 specific to this pro
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."
>
> That settles my question. The classes I have written for this pro
$Bill Luebkert wrote:
Lyle Kopnicky wrote:
Thanks for your reply. But supposing I'm going to keep each class in
it's own file, what is the advantage of making that file a module?
Have you read the man pages on modules ?
perlmod Perl modules: how
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 imported unless y
Thanks for your reply. But supposing I'm going to keep each class in
it's own file, what is the advantage of making that file a module?
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
Lyle Kopnicky wrote:
> Thanks for your reply. But supposing I'm going to keep each class in
> it's own file, what is the advantage of making that file a module?
Have you read the man pages on modules ?
perlmod Perl modules: how they work
perlmodlib Perl m
$Bill Luebkert wrote:
Lyle Kopnicky wrote:
Hi folks,
This is just a straight-up Perl question: Is there any advantage to
turning a class into a module? Or does it make more sense to put
multiple classes in one file? Thanks.
It's easier to keep track of them if they have their ow
Lyle Kopnicky wrote:
> Hi folks,
>
> This is just a straight-up Perl question: Is there any advantage to
> turning a class into a module? Or does it make more sense to put
> multiple classes in one file? Thanks.
It's easier to keep track of them if they have their own modules.
You can obvio
Hi folks,
This is just a straight-up Perl question: Is there any advantage to
turning a class into a module? Or does it make more sense to put
multiple classes in one file? Thanks.
--
Lyle Kopnicky
Software Project Engineer
Veicon Technology, Inc.
_
23 matches
Mail list logo