OO Perl Online Learning



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
--
Xiong Changnian
xiong102ATxuefangDOTcom

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: Compare IP addresses
    ... You cannot type variables when you declare them, ... > but the script didnt like that - that was the reason for setting the ... startoctet and endoctet werent declared either? ... >>> How do I compare two numbers in script? ...
    (microsoft.public.scripting.wsh)
  • cron script hangs after a while (seems to)
    ... these scripts from my package, ... Create an html page from the log created by the previous script. ... declare ip_src_table ...
    (comp.unix.shell)
  • Re: I thought this would be easy - HELP
    ... below tries to create variables via slice method take information from ... selected options and use the info in functions which calucate values. ... Here you declare a local variable total but also want access to a ... the script with: ...
    (comp.lang.javascript)
  • RE: variable declaration, was RE: moving to the next line
    ... Declare them as you go. ... When taking programming classes in college, ... Several people on this list have discouraged the habit. ... their script before opening their text editor. ...
    (perl.beginners)
  • RE: hi
    ... other code that used strict. ... If you do need a variable to exist throughout the entire script, ... you can declare it at the top of your script or use 'our' instead of ... You're looping through an array, using a variable inside the loop. ...
    (perl.beginners)