--nextPart1167735.9XiD6iYXY2
Content-Type: text/plain;
  charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

quoth the coachhilton / gmail.com:
<snip>
>
> Well, this is quite a "can of worms" topic, now isn't it?  

He, well, I certainly didn't intend for it, I am simply a self-taught 
programmer who lacking a formal education tries to muddle through and pick up 
some sage advice from here and there when possible...

> For whatever 
> its worth, here's what I do: I have a base class I've been working on
> over time from which I derive all of my other scripts.  In this base
> class I have all of the logic to configure the script, from command
> line options, to environment vars to config files along with a bunch of
> handy helper methods for things like logging and debugging.  The
> results of the configuration go into member variables of this base
> class, or optionally a hash of properties, and thereby form the context
> in which the actual script/application runs.  Sure, these are really
> global variables packaged up in the base class but at least they are
> encapsulate and the script doesn't know where they came from or how
> they got there.  
> This has worked pretty well for me over time for a 
> variety of program sizes.
>
> Now then, the direction I've been heading in lately has been toward
> "inversion of control" (see
> http://martinfowler.com/articles/injection.html for a very nice
> presentation of the topic.)  I envision going to a Dependency Injection
> pattern some time soon in which the configuration information is
> obtained from an inversion control container, as described by Fowler.
> But I think I'd only go to this level of "complexity" for true
> applications and not for hundren line "scripts".

Hmm, that link you posted was a little over my head. I understand the concepts 
presented on the "inversion of control" page, but that is about it...

> Hope this helps.

As I was basically just fishing for ideas, sure it did, thanks!

> Ken

-d
-- 
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972

--nextPart1167735.9XiD6iYXY2
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)

iD8DBQBE2PAUwPD5Cr/3CJgRAnUoAJ4yNFp6MRL5hNPw9TgzfVANp8ALPwCffvCR
3rXXJjowj2vijYIKiSQdDmggm
-----END PGP SIGNATURE-----

--nextPart1167735.9XiD6iYXY2--