X
Xiong Changnian
I've browsed my fingers off, read all the obvious sources and quite a
few that are off-topic for my needs. I've even been to the local
computer bookstore; there are many books on OO Perl, each with a hefty
price tag. I'm not cheap; I'm broke.
There seems to be little online between perltoot and the like; and
highly specific discussions that assume advanced knowledge and dive into
esoterics. I don't see the bridge -- general intermediate discussion of
OO Perl.
Here are the kinds of questions I've been trying to answer for myself:
* What is all this about makefiles and installation? Why isn't it enough
to download a module and un-tar it to my lib directory? Perhaps I'm
handicapped, running MacPerl under OS 9. I haven't been able to install
anything I've downloaded, not even stuff that shouldn't have anything to
do with the Mac file system.
* All the CPAN modules seem to be just one class per module; every
source I've read says you *can* declare more than one package in a file
but it seems that in practice, it's one class, one package, one module,
one file. Yet I'm contemplating a set of perhaps 20 closely related
classes. I don't know if I'm taking the wrong approach or if there's a
way to bundle them neatly. And yes, I've read a little on CPAN bundles;
I'm still in the dark. I suspect this question ties into the last.
* The *use* pragma makes a class available in a given file but doesn't
seem to propagate; I have to *use* the class everywhere I, well, use it.
Is there no single place I can declare an entire set of classes for use
in any script that *uses* that file? This obviously ties into the last.
* Same question, different angle: If I *use* and inherit among a group
of classes, it seems I run into dependency problems. Is this a lack of
clear thinking on my part and I need to draw up a strict table of
dependencies and work out the order in which the compiler sees
declarations? Or can I just throw everything in if I declare them the
"right" way?
* What's all this about test suites? I can understand writing a script
that stands on its own and exercises a module. I see discussions that
look as though these test scripts are being generated automatically in
some way.
* Should I *always* use strict and use warn? I've been doing just that,
beating the code until it works under these conditions. I see a lot of
code online that shouldn't, though. Right now, I'm using symbolic refs
in one place and I feel I oughtn't.
Nobody has to take the time to answer any of these questions *here* but
I'd love a pointer or five.
Xiong
few that are off-topic for my needs. I've even been to the local
computer bookstore; there are many books on OO Perl, each with a hefty
price tag. I'm not cheap; I'm broke.
There seems to be little online between perltoot and the like; and
highly specific discussions that assume advanced knowledge and dive into
esoterics. I don't see the bridge -- general intermediate discussion of
OO Perl.
Here are the kinds of questions I've been trying to answer for myself:
* What is all this about makefiles and installation? Why isn't it enough
to download a module and un-tar it to my lib directory? Perhaps I'm
handicapped, running MacPerl under OS 9. I haven't been able to install
anything I've downloaded, not even stuff that shouldn't have anything to
do with the Mac file system.
* All the CPAN modules seem to be just one class per module; every
source I've read says you *can* declare more than one package in a file
but it seems that in practice, it's one class, one package, one module,
one file. Yet I'm contemplating a set of perhaps 20 closely related
classes. I don't know if I'm taking the wrong approach or if there's a
way to bundle them neatly. And yes, I've read a little on CPAN bundles;
I'm still in the dark. I suspect this question ties into the last.
* The *use* pragma makes a class available in a given file but doesn't
seem to propagate; I have to *use* the class everywhere I, well, use it.
Is there no single place I can declare an entire set of classes for use
in any script that *uses* that file? This obviously ties into the last.
* Same question, different angle: If I *use* and inherit among a group
of classes, it seems I run into dependency problems. Is this a lack of
clear thinking on my part and I need to draw up a strict table of
dependencies and work out the order in which the compiler sees
declarations? Or can I just throw everything in if I declare them the
"right" way?
* What's all this about test suites? I can understand writing a script
that stands on its own and exercises a module. I see discussions that
look as though these test scripts are being generated automatically in
some way.
* Should I *always* use strict and use warn? I've been doing just that,
beating the code until it works under these conditions. I see a lot of
code online that shouldn't, though. Right now, I'm using symbolic refs
in one place and I feel I oughtn't.
Nobody has to take the time to answer any of these questions *here* but
I'd love a pointer or five.
Xiong