Personally I'd have to say... it depends..
If it's a short and dirty script that will eventually be thrown away and
never modified by anyone other than yourself, it can be as messy as it has
to be to get the job done.
If on the other hand there's ever a possiblility that it will be used by
someone else I always try to keep things to the standards in the Camel book.
On the third hand (just call me Zaphod) it's going to be a high-level
production tingamabob. I do just what you mention, I write my subs to return
output from only one location, no dieing, or anything like that, and I write
an error handling sub to deal with error notification. This make things very
nice if you ever want to take the functions in the script and bundle them
into a module (which Has happened to a few of my bigger scripts.)
g:wq
-----Original Message-----
From: Rob Waggoner [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 8:27 AM
To: [EMAIL PROTECTED]
Subject: Perl Style?
If this is not an appropriate place to wax philosophic about perl, let me
know and I will take my questions else where.
I'm curious to hear from others who have worked with perl and other
programming/scripting languages. More specifically I'm curious as to how
those "other" languages either affect your perl development, or how perl
affects development in the other language.
This "curiosity" arises from perls "If it feels good, do it" attitude which
is counter to my traditional B.S.C.S. training of "no matter how good it
feels, do it by the book (which is 30 years old)."
An example of this comes from the Camel book which, in discussing loops,
sates that it's o.k. to leave the (loop, sub, etc.) when ever you like. In
fact, it's really o.k. to have several exit points from a block if it makes
sense to do so (this caused a serious short circuit in my traditional mind).
Personally, I am at the point where I am not only learning perl syntax, but
trying to absorb as much "elegance" as I can along the way while trying
minimize external influences. Like all things this will take time.
I suppose what I should do is revisit this:
http://www.waggs.net/perl/CountCodeRed.txt
(which produces this:
http://www.waggs.net/perl/coderedcount.xml
which ultimately will be used to produce a visual like this:
http://www.waggs.net/VMLSamp1.htm)
in a couple of moths to see how much more elegant I can make it.
I'd like to hear of other experiences.
Thanks.
Rob Waggoner
Master Applications Craftsman
WAGGS
Web based Advanced Graphics and Graphing Solutions
http://www.waggs.net
"Applying Old world craftsmanship to New world technologies"
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]