[9043] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2661 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 21 12:07:39 1998

Date: Thu, 21 May 98 09:00:27 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 21 May 1998     Volume: 8 Number: 2661

Today's topics:
    Re: AutoLoader/SelfLoader/other techniques (Earl Hood)
    Re: books for learning perl <upsetter@ziplink.net>
    Re: case insensitive checks, a=b <aqumsieh@matrox.com>
    Re: Converting between number systems (Mike Stok)
    Re: Dose %_ have a spacal meaning? <merlyn@stonehenge.com>
    Re: GNU attacks on the open software community chris+usenet@netmonger.net
    Re: GNU attacks on the open software community (Paul D. Smith)
    Re: GNU attacks on the open software community chris+usenet@netmonger.net
    Re: GNU attacks on the open software community chris+usenet@netmonger.net
    Re: GNU attacks on the open software community <ak@muc.de>
    Re: GNU attacks on the open software community (Ken Fox)
    Re: GNU attacks on the open software community (Ken Fox)
    Re: GNU attacks on the open software community chris+usenet@netmonger.net
    Re: GNU attacks on the open software community (Matthew R. Williams)
    Re: GNU attacks on the open software community (Steve McNabb)
    Re: GNU attacks on the open software community (Chris Nandor)
    Re: GNU attacks on the open software community <ak@muc.de>
    Re: GNU attacks on the open software community (Chris Adams)
    Re: How to include a file that contains subs <aqumsieh@matrox.com>
    Re: I need help using the system command <aqumsieh@matrox.com>
    Re: Problem de-referencing a reference to a typeglob st (Bob Kline)
    Re: Software vendor liability [Was: Does Perl have a ID (Dave Till)
    Re: Sourcing Unix environment file? <spicano@ptdcs2.intel.com>
        Spawning kermit sessions from perl5 <andyh@pavilion.co.uk>
    Re: Win32: Calling DLL's from Perl (Bbirthisel)
    Re: Writing to files (Fritz Knack)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 21 May 1998 15:28:54 GMT
From: ehood@geneva.acs.uci.edu (Earl Hood)
Subject: Re: AutoLoader/SelfLoader/other techniques
Message-Id: <6k1h7m$94o@news.service.uci.edu>

	[mail & posted]
In article <tzlnrwvo90.fsf@zinger.adp.wisc.edu>,
Don Thomson  <thomson@zinger.adp.wisc.edu> wrote:

>     AutoLoader only reads code as it is requested, and in many
>     cases should be faster, but requires a machanism like
>     AutoSplit be used to create the individual files.

AutoSplit is not needed to use AutoLoader, and is not necessarily the
best mechanism when dealing with module maintenance.  It assumes a
single person development model.  For example, to change a single
routine, a person needs to have access to the entire module source.  If
someone else needs to work on another routine, they will have to wait
until the other person is done.  May not be an issue for small modules,
but for large ones, it can be.  Now, some may state that if
the module is getting large, that it should be broken up into
smaller modules.  This may be possible, and should be considered, but
if the same namespace is to be shared, breaking up into separate
modules is not a choice.  One could do multi-file development of
a module by doing the loads explicitly via "require" from the main
module source.

Another problem with AutoSplit is that it is not full-proof in its
splitting since it does not completely parse Perl.  Beginning of
subroutines must be start at the very beginning of a line with the
routine name on the same line as the "sub" keyword.  Any brace that
starts at the beginning of a line is assumed to terminate the
subroutine.  Most people use this style, but it can still be a problem
with Perl style followers if using "here" documents.

I've written modules where I do the split myself and can maintain
individual functions/methods in separate files instead of one
monolithic file.  This method does have the disadvantage when doing
syntax checks if functions/operators that are loaded in the main source
are used by individual routines.  I use functional syntax to keep "perl
-c" from complaining.  Another work-around is to use forward subroutine
declarations.

Doing things manually, also requires manual maintenance of the
autosplit.ix file.  However, this is trivial, especially if module
defines only a class.

Once nice thing about manually doing the split is that you can
incorporate multiple routines in a .al file.  For example, you may have
a routine with helper functions.  Instead of incurring the overhead of
loading all the separate helper routines, you can include them with the
main routine's .al file so all the routines are loaded when the main
routine is called.

	--ewh
-- 
             Earl Hood              | University of California: Irvine
      ehood@medusa.acs.uci.edu      |      Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME


------------------------------

Date: 21 May 1998 14:53:37 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: books for learning perl
Message-Id: <6k1f5h$dgi@fridge.shore.net>

Tom Christiansen <tchrist@mox.perl.com> wrote:
:  [courtesy cc of this posting sent to cited author via email]

: In comp.lang.perl.misc, plikidis@sias.com writes:
: :I would suggest the idiot's guides... they are excellent. 

: But most programmers aren't idiots -- and don't like being called the same.

As a non-idiot, I've almost always found O'Reilly's guides to just about
everything (Perl, Unix, Emacs) to be well-written and
close-to-authoritative.

--Art

--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
            http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------


------------------------------

Date: Thu, 21 May 1998 10:01:13 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: case insensitive checks, a=b
Message-Id: <356433A8.20E0A481@matrox.com>

David@iqtexas.com wrote:

> $a='dog';
> $b='DoG';
>
> if($a eq $b) {cool,they are alike} else {do something else}
>
> Is there a "Perl like" way to do this?
>
> non Perl methods:
> 1) replacing the variables using uc
>    if(uc($a) eq uc($b))

This is as Perly as you can get ;-)

> 2) writing a sub to return the upper case or lower case for the comparison
>    if(my_uc($a) eq my_uc($b))

That's not so Perlish ... but you will be reinventing the wheel. (or in this
case the uc function).

> Thanks for the help,
> -David

You might also want to use regexps like so:

if ($a =~ /$b/i) {
# do your stuff
}

Hope that helps,

--
Ala Qumsieh             |  No .. not just another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)





------------------------------

Date: 21 May 1998 15:26:50 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Converting between number systems
Message-Id: <6k1h3q$iou@news-central.tiac.net>

In article <35644d62.0@vortex.netcentral.co.uk>,
Kath Topping <ket@inf-ltd.co.uk> wrote:
>Sorry if this is a dumb question but I'm a new user and I just can't get the
>hang of converting between number systems.
>
>In the Nutshell handbook, Programming Perl on page 200 it says "A bit vector
>can be translated to or from a string of 1's and 0's by supplying a b*
>template to unpack() or pack(). Similarly, a vector of nybbles  can be
>translated to an h* template.
>
>Well I'm hanged if I can do it. I am trying to convert a 16 bit binary
>string into hex. When I try the above, I get a particularly irritating
>string of smiley face control characters.
>
>Is my machine having a laugh or am I doing it wrong? Can anyone tell me the
>correct way to convert between numbering systems using Perl functions. I
>need to go:
>decimal integer to binary vector, and vice versa,
>hex to binary vector, and vice versa.

Consider this:

  DB<1> $bin = '1110100001001100'

  DB<2> $val = pack 'B*', $bin

  DB<3> print $hex = unpack 'H*', $val
e84c

so for going from multiples of 8 length strings of 1s and 0s to a hex
representation you might say

  $hex = unpack 'H*', pack 'B*', $bin;

  $bin = unpack 'B*', pack 'H*', $hex;

to get a decimal value to and from a hex string you might consider

  $dec = hex $hex;

  $hex = sprintf '%x', $dec;

Note that $hex and $bin are character strings and get packed into some
number of bytes large enough to contain the bits - do a single nybble gets
packed into a byte so 

  print unpack 'B*', pack 'H*', 'e';		# says 11100000
  print unpack 'H*', pack 'B*', '1001';		# says 90

Hope this helps,

Mike
-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


------------------------------

Date: Thu, 21 May 1998 15:32:49 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Dose %_ have a spacal meaning?
Message-Id: <8cn2cbprkv.fsf@gadget.cscaper.com>

>>>>> "Kevin" == Kevin Reid <kpreid@ibm.net> writes:

>> ... and it is forced to be in %main, even if you are in a different
>> package.

Kevin> Shouldn't that be %main::?

Oops... yes.  Grr.  The colon-ator must have come through my GNUS
session again. :-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 103 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


------------------------------

Date: 21 May 1998 14:58:01 GMT
From: chris+usenet@netmonger.net
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1fdp$ehj$2@schenectady.netmonger.net>

In article <6k1b7a$l3c@bourbon.cs.umd.edu>,
William C. Cheng <william@cs.umd.edu> wrote:
> In article <6k0b8b$s3a$1@schenectady.netmonger.net>,
>   <chris+usenet@netmonger.net> wrote:
>  >RMS believes that his style of free software and his licensing system
>  >are the best way to do good for the computing community.  Is he not
>  >allowed to have this opinion?  He is mad at O'Reilly because they sell
>  >a lot of books about GNU software but they don't donate anything to
>  >the FSF.  His response is to ask people to write free books which the
>  >FSF can sell to raise money (and you can also photocopy or download
>  >them).  Is any of this truly evil?  You may disagree (I sometimes do),
>  >but I think it is self-evident that what RMS is doing is logical and
>  >consistent with respect to his philosophy of free software.
> 
> Isn't what O'Reilly is doing in line with the spirit of GPL?  May be the
> irony is just too much!

It complies with the GPL, as the GPL doesn't say anything about what
you must do if you write a book about a GPL'd program.  The point is
that when you start to make a lot of money doing so, the FSF will
(quite naturally) hope that you make a donation.  If you don't, they
will (quite naturally) say "If you want to support the FSF, buy books
from us instead of from that company".  It's a philosophical and moral,
not a legal argument.  RMS may find it annoying, but it doesn't mean
he wants to stop giving people the freedom to do it.
-- 
	    Christopher Masto <chris+usenet@netmonger.net>
	Director of Operations, NetMonger Communications, Inc.

		     "Behold the Power of Cheese"


------------------------------

Date: 21 May 1998 11:05:59 -0400
From: psmith@baynetworks.com (Paul D. Smith)
Subject: Re: GNU attacks on the open software community
Message-Id: <p5som3br54.fsf@baynetworks.com>

%% Tom Christiansen <tchrist@mox.perl.com> writes:

  tc>  [courtesy cc of this posting sent to cited author via email]
  tc> In comp.lang.perl.misc, 

  tc>     pudge@pobox.com (Chris Nandor) writes:
  :I officially redefine "free" as meaning "provided with ketchup".  Any
  :other usage with me is misleading.

Fine.  Create a license that's used by thousands of packages and
hundreds of thousands of people, have it considered, argued over,
etc. for 10 years, start an organization based on your interpretation of
free, win a number of grants and other awards, become a recognized
spokesperson, create many writings describing exactly what you mean and
why you think it's the right thing and make them publicly available,
etc.

Then, when you use the word "free" in your bulletins and list of tasks
your organization has on its plate, we'll all know you mean "provided
with ketchup" and you won't have to make that explicit in every post.

  tc> You infidel!  What are you thinking!  Everyone knows that "free"
  tc> means "provided with mustard".  I can't believe your insensitivity.
  tc> This is a terrible threat to the Free 3735928559 Movement everywhere.

Brother.

OK, so Chris and Tom are upset that when RMS writes "free" in his posts,
it doesn't mean what they think of as "free".

But it appears to me that Tom's documents aren't free by _ANY_
commonly-accepted definition of "free" in the software industry.

  They aren't free as in "public domain".
  They aren't free according to the BSD license.
  They aren't free according to the GPL.
  They aren't free according to the Artistic License.
  They aren't free according to the Debian Free Software Guidelines.
  They aren't free according to the Open Source Definition.

It seems to me that _Tom_ is the one using the uncommon definition of
"free", not RMS.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
     These are my opinions--Bay Networks takes no responsibility for them.


------------------------------

Date: 21 May 1998 15:11:24 GMT
From: chris+usenet@netmonger.net
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1g6s$ehj$3@schenectady.netmonger.net>

In article <6k0gm3$827$3@csnews.cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, 
>     Klaus.Schilling@home.ivm.de writes:
> :X is not needed at all by the GNU/Linux system. One can do extremely well 
> :without any GUI stuffs. Thus I don't have any X stuff installed at all.
> 
> Oh stop this silliness.  It's Linux.  Adding the word "GNU" is an insult.

And you don't acknowledge the point of view that it is an insult to
call it "The Linux Operating System" even though it consists almost
entirely of GNU code.  What about the moral rights of the GNU authors?
Aren't they being raped by the evil Linus who wants to take their GNU
project and put his name on it and call it his own?

I don't agree with that argument (mostly because I know that Linus
does not feel that way, and few, if any, of those who don't say
"GNU/Linux" intend any disrespect or slight to the GNU project).
But it seems to me that it's pretty much the same as your argument
about Perl.  I could make a module called Masto and distribute
it along with Perl, calling it "The Masto System".  If that caught
on and you started to see CD-ROMs in stores and news articles on CNN
about this new amazing Masto system, would it not bother you that
Perl gets no credit?

It's not an insult to add "GNU" - it's a request to acknowledge the
GNU project's contributions to Linux-the-OS.  It helps raise public
visibility for the FSF.

I usually call it "Linux", and I personally prefer BSD systems, but
that doesn't mean I'm incapable of understanding RMS' argument.
-- 
	    Christopher Masto <chris+usenet@netmonger.net>
	Director of Operations, NetMonger Communications, Inc.

		     "Behold the Power of Cheese"


------------------------------

Date: 21 May 1998 15:13:28 GMT
From: chris+usenet@netmonger.net
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1gao$ehj$4@schenectady.netmonger.net>

In article <m2lnrvybr4.fsf@bigglesworth.isdn.uiuc.edu>,
Matthew R. Williams <mrw@uiuc.edu> wrote:
> Perl-RMS...break all the object stuff because RMS doesn't like data
> abstraction[1]?
> 
> [1] I heard that from the XEmacs folks.  Am I wrong?

No, that's Tom who doesn't like objects.

<blink>

-->   :-)    <--

</blink>
-- 
	    Christopher Masto <chris+usenet@netmonger.net>
	Director of Operations, NetMonger Communications, Inc.

		     "Behold the Power of Cheese"


------------------------------

Date: 21 May 1998 17:20:48 +0200
From: Andi Kleen <ak@muc.de>
Subject: Re: GNU attacks on the open software community
Message-Id: <m3yavvabvz.fsf@fred.muc.de>

Barry Margolin <barmar@bbnplanet.com> writes:
> 
> Problem 1 is harder to solve, since the GPL doesn't permit additional
> restrictions to be added to it, so you wouldn't be able to combine
> something that prohibits modifications with a GPLed work if you planned on
> distributing the result.

Tom as the copyright holder could release it under different copyrights
too, so if he e.g. wants to incorporate it in the camel book that should
be no problem. Of course when someone else modifies a significant part of 
the GPLed version and he merges the changes into his version then
he has to ask the other author to agree to the copyright change too [or
not use his work]


-A.


------------------------------

Date: 21 May 1998 14:52:24 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1f38$el32@eccws1.dearborn.ford.com>

pudge@pobox.com (Chris Nandor) writes:
> I officially redefine "free" as meaning "provided with ketchup".  Any
> other usage with me is misleading.

I'd like to see you excercise your right to free speech using
your definition. ;)

English words have multiple meanings.  The FSF uses one meaning
of free (e.g. free speech) while others don't (e.g. free beer).
There's nothing wrong with this, but it is important to remember
what meaning the speaker intends.

- Ken

-- 
Ken Fox (kfox@ford.com)                  | My opinions or statements do
                                         | not represent those of, nor are
Ford Motor Company, Powertrain           | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section             | "Is this some sort of trick
                                         |  question or what?" -- Calvin


------------------------------

Date: 21 May 1998 15:19:22 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1glq$el33@eccws1.dearborn.ford.com>

Zenin <zenin@bawdycaste.org> writes:
> GPL code is only "free" for "free use".  It's great for use where
> you don't ever want your code used for commercial use, but if you
> do it's a nightmare.

That's true.  That's why it exists.  If you don't agree with it,
just don't use it.  Use the Artistic license or the BSD license or
the XFree86 license or ...

If the FSF decides that a GPL'd Perl documentation project is
important, how does that interfere with Tom's documentation?  It
seems to me that GPL'd documentation would be at least as valuable
as a commercial Perl book.  Nobody is telling Tom he should change
his copyright.  His work offers benefits that GPL documentation
doesn't (his witty commentary for instance) so I think it's
valuable.  Why that work is threatened by a GPL documentation
project is something I don't understand.

Why all this talk of virii?

- Ken

-- 
Ken Fox (kfox@ford.com)                  | My opinions or statements do
                                         | not represent those of, nor are
Ford Motor Company, Powertrain           | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section             | "Is this some sort of trick
                                         |  question or what?" -- Calvin


------------------------------

Date: 21 May 1998 15:15:54 GMT
From: chris+usenet@netmonger.net
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1gfa$ehj$5@schenectady.netmonger.net>

In article <pudge-2105980921570001@dynamic95.ply.adelphia.net>,
Chris Nandor <pudge@pobox.com> wrote:
> In article <_bS81.68$152.620589@cam-news-reader1.bbnplanet.com>, Barry
> Margolin <barmar@bbnplanet.com> wrote:
> 
> # The GPL doesn't force you to share with your friends, it allows it.
> 
> What an odd thing to say.  Since when does something like sharing your own
> work with your friends need to be allowed?  Does it allow me to cross the
> street without my mommy, too?

It allows your friends to share with their friends as well, and
guarantees that the same freedom to share is passed on along with that
which is shared.
-- 
	    Christopher Masto <chris+usenet@netmonger.net>
	Director of Operations, NetMonger Communications, Inc.

		     "Behold the Power of Cheese"


------------------------------

Date: 21 May 1998 10:28:54 -0500
From: mrw@uiuc.edu (Matthew R. Williams)
Subject: Re: GNU attacks on the open software community
Message-Id: <m2g1i3y761.fsf@bigglesworth.isdn.uiuc.edu>

chris+usenet@netmonger.net writes:

> And you don't acknowledge the point of view that it is an insult to
> call it "The Linux Operating System" even though it consists almost
> entirely of GNU code.  

Ex-squeeze me? 

The kernel doesn't look like it's heavily influenced by GNU anything.
Linus wrote that from scratch.

And as far as the bells and whistles of an OS, silly things like
bash, emacs, etc...well, shit.  Some of that will compile for
WinDoze boxes, won't it?  So let's call Bill Gates and have him
call his boxes GNU/Windows systems.



-- 
Next time somebody annoys you by romanticizing some hell-hole of a
previous era, listen carefully, you'll hear any number of caveats
being placed on their projected experience: "I have to be rich"; "I
have to be a member of the ruling class"; "I have to have all my
vaccinations"; "I have to have my contact lenses"; "I have to have my
appendix out first"; "I have to have my Walkman and my New Order CDs."
Tell these people to keep their gobs shut. Say to these annoying
people, "Hey kids--the past wasn't like a trip to Waikiki: the only
sure thing about the past is some ghastly disease, carnage, toil that
defies all description, starvation, and boredom of a sort that makes
waiting in line at the Department of Motor Vehicles seem like
Disneyland on heroin.
		-Douglas Coupland 
---------------------------------------------------------------
Matthew R. Williams	mrw@uiuc.edu
Geek of All Trades	http://bigglesworth.isdn.uiuc.edu/~mrw/
---------------------------------------------------------------


------------------------------

Date: 21 May 1998 15:37:09 GMT
From: smcnabb@interlog.com (Steve McNabb)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1hn5$i97$1@nntp3.uunet.ca>

Well, just had to jump in with my own $0.25  ;-)

In article <6k0k9k$dn2$1@csnews.cs.colorado.edu>, tchrist@mox.perl.com says...
 
[ bunch-o-junk snipped]
>
>I then realized with abject horror that GPV'd documentation is a grave
>threat to free software, especially Perl.  That's because with 1,000
>pages of free documentation in Perl--far and beyond the most extensive
>free documentation of any free software--people look to it for examples
>to copy into their own code.  This is part of the its goal.
>
>We must therefore remove the GPV from the Perl documentation *now*

Before I go any further, a quick sum of the facts:

1)  If tomc (or Larry, or Nathan, or Randall, or whoever) writes it, he/she can 
do whatever the hell he/she wants with it.  If you don't like that, well, write 
your own documentation and submit it to  c.l.p.m -- we're all in favour (I'll 
bet even tom ;-) of the constant evolution and improvement of the 
documentation, and we'd love to hear your suggestions.

2)  The GPV does, in fact, make it a violation to copy-and-paste code from 
examples (ummmmm -- that's the whole _point_ of code examples!) into a program 
that is sold for profit.   I for one, do this _all_ the time...it's handy and 
why muck with something if someone has already done it concisely, cleanly and 
elegantly?  If I could write what I wanted better/faster/more elegantly than 
the example, I would do so.   The idea that if you happen to get paid for what 
you do that you should not use the freely (meaning, really freely ;-) available 
example code is just plain dumb.  If the author doesn't mind, why should you?
 
Ok -- now, the FSF seems to be putting forward the idea that anyone who doesn't 
subscribe to their concept of 'free'  (hmm...if I can't use the code in the 
examples for whatever the hell I want, is that so free?) is a moral leper.  
Guess what FSF?  you don't have a monopoly on the idea that good software 
should be freely available to anyone who wants to use it.

As much as I admire some of the work that the FSF has done, (whoa -- here comes 
the flame mail ;-), this whole "my concept of free is more pious than yours" 
squabble is doing no one any favours.

Maybe instead of squabbling over who gets to control the "free-ness" of the 
documentation, we should be concentrating on improving the documentation 
itself?  As many new Perl users come along, the constant flood of "stupid 
newbie questions" is only going to get worse.  Why not try and make the 
documentation a little more "newbie friendly"? Just a suggestion -- maybe a few 
extra tutorials about how to do some of the basic perl thingys is in order? 
What about "here are the top 5 places, in order, where you should look for 
answers to your questions?  (docs, perlfaq, reference.perl.com, etc)" and how 
to find them.  Although many experienced users disdain this sort of hand 
holding, as a fledgeling (sp?) perl head, I needed a little more hand-holding 
to get going full steam than your average bear.  Luckily, I had a local Perl 
guru friend to explain some of the more complex/weird/obscure perl concepts and 
terminology.  Yes, I know that perl is not (nor is it intended to be) an 
end-user consumable. However, if people (myself included) wanted to address 
this a little, would it be such a horrid thing to have a "here is a gently 
paced, easy to understand intro to hacking in perl" around in the standard 
distribution for those users (mostly Win32 victims like myself ;-) who need a 
little more pablum in their perl diet for the first few cycles?  Just because 
we start out stupid doesn't mean we can't evolve into usefull, contributing 
members of the perl community with a little nurturing.

The FSF clearly has a political agenda of it's own, and that's fine.  Just 
don't expect people to automatically think that because the FSF said they 
should do it, people will.  Saying that any other position is morally defective 
sounds like fanaticism to me.

Who decided (other than yourselves) that all free software should be under the 
governing eye of the FSF?  Guess what -- you aren't in charge just because you 
decide that you are.

I'd like to take this opportunity to point out that although (of course) tom 
does make some income off some of the perl-related stuff that he does, he (and 
many others too numerous to mention) contribute a _gargantuan_ amount of time 
and energy gratis to help (or plonk ;-) people with their problems/questions.  
You may not always like the tone of your answer, but hey -- 
*you*got*an*answer*didn't*you*????????????  Try that with Microsoft - pay $100 
a phone call to find out that there is a bug in their product which they have 
no intention of fixing until the next release, for which you will have to pay.

To anyone who has ever taken that extra 45 seconds out of their busy day to 
help a new, clueless or just perlplexed fellow perl head, my heartfelt thanks.  
I would never have made it to my (admittedly humble) current level of perl 
knowledge/skill/love without your collective help:  either through 
documentation, persnickety usenet postings  ;-) , or directly by email or IRC.

If the GPV won't allow users to do _whatever_ they want (except sell as their 
own or redistribute in labotomized form of course) with the perl source, docs, 
modules, extensions, interfaces, whatever, then it should be stripped out of 
each and every piece of perl anything, forever. (hey tom -- why not post a GPV 
virus scrubber for the perl docs? ;-)


Now, back to your regularly scheduled cascade

$REGARDS++;

Steve









------------------------------

Date: Thu, 21 May 1998 15:44:47 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: GNU attacks on the open software community
Message-Id: <pudge-2105981139060001@dynamic95.ply.adelphia.net>

In article <6k1f38$el32@eccws1.dearborn.ford.com>,
kfox@pt0204.pto.ford.com wrote:

# pudge@pobox.com (Chris Nandor) writes:
# > I officially redefine "free" as meaning "provided with ketchup".  Any
# > other usage with me is misleading.
# 
# I'd like to see you excercise your right to free speech using
# your definition. ;)

You should have known me in high school.  My lunch one day included a 64
ounce free bottle.  Soon after I lost it into a trash can, which was a bit
disgusting, but one can handle only so much freedom.  The vice principal
tried to reprimand me, but recognized my right to a free lunch, and I was
released into the recognizance of my sixth-period teacher.


# English words have multiple meanings.  The FSF uses one meaning
# of free (e.g. free speech) while others don't (e.g. free beer).
# There's nothing wrong with this, but it is important to remember
# what meaning the speaker intends.

Agreed.  Please remember that when I am speaking.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


------------------------------

Date: 21 May 1998 17:46:48 +0200
From: Andi Kleen <ak@muc.de>
Subject: Re: GNU attacks on the open software community
Message-Id: <m3vhqzaaon.fsf@fred.muc.de>

mrw@uiuc.edu (Matthew R. Williams) writes:

> chris+usenet@netmonger.net writes:
> 
> > And you don't acknowledge the point of view that it is an insult to
> > call it "The Linux Operating System" even though it consists almost
> > entirely of GNU code.  
> 
> Ex-squeeze me? 
> 
> The kernel doesn't look like it's heavily influenced by GNU anything.
> Linus wrote that from scratch.

But the kernel would have never existed without gcc and binutils. 

-Andi


------------------------------

Date: 21 May 1998 15:56:33 GMT
From: cadams@ro.com (Chris Adams)
Subject: Re: GNU attacks on the open software community
Message-Id: <6k1irh$ikq$1@news.ro.com>

According to  <chris+usenet@netmonger.net>:
>And you don't acknowledge the point of view that it is an insult to
>call it "The Linux Operating System" even though it consists almost
>entirely of GNU code.  What about the moral rights of the GNU authors?
>Aren't they being raped by the evil Linus who wants to take their GNU
>project and put his name on it and call it his own?

I don't know what Linux you are talking about, but the one I am using
does not "consist almost entirely of GNU code".  Linux uses the GNU C
compiler with some developments made by the Linux community and
contributed back to GNU, a C library based on an old GNU C library
with lots of development by the Linux community, now contributed into
the new GNU C library which is being maintained by both GNU and Linux
developers, and other GNU utilities.  Linux uses almost all of the GNU
utilities, however, all of the GNU utilities do NOT make up Linux.  The
networking utilities (and other things) are based on BSD versions.  A
lot of the base programs were developed from the ground up for Linux.
Things like cron, X, Perl, Tcl/Tk, BIND, sendmail, Apache, and wu-ftpd
are developed on many platforms.  Some things like ncurses are developed
primarily under Linux.

Want a GNU system?  Fine, take just your FSF software and try to build a
real system.  Go run the Hurd.  Don't use perl, X, ncurses, sendmail,
etc.

Again, if the GNU authors wanted their "moral rights" protected, they
should use a different license.  I have never heard these kind of
complaints from GNU developers.  For example, I have seen posts on the
linux-kernel mailing list from Ulrich Drepper, who maintains the GNU C
library now, and I've never seen him complain about credit.  Linus
doesn't take GNU project code and call it his own, either.  He writes,
maintains, and organizes the kernel.
-- 
Chris Adams - cadams@ro.com
System Administrator - Renaissance Internet Services
I don't speak for anybody but myself - that's enough trouble.


------------------------------

Date: Thu, 21 May 1998 09:54:07 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: How to include a file that contains subs
Message-Id: <356431FF.6C8A4FE3@matrox.com>

Deepak Khosla wrote:

> Hi,
> Is there a simple syntax in perl for including a set of subroutines etc. in
> a separate file (library). I don't want to turn them into modules but would
> like to share those among different progs. I could not find any ref to this
> in the FAQs

 Your best bet is to turn your subroutines into a module. Making a module is
very easy. Just have a look at
perldoc perlmod

Hint (from perlmod):

     For example, to start a normal module called Fred, create a
     file called Fred.pm and put this at the start of it:

         package      Fred;
         require      Exporter;
         @ISA       = qw(Exporter);
         @EXPORT    = qw(func1 func2);
         @EXPORT_OK = qw($sally @listabob %harry func3);

     Then go on to declare and use your variables in functions
     without any qualifications.  See the Exporter manpage and
     the Perl Modules File for details on mechanics and style
     issues in module creation.

     Perl modules are included into your program by saying

         use Module;

     or

         use Module LIST;


--
Ala Qumsieh             |  No .. not just another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)





------------------------------

Date: Thu, 21 May 1998 09:57:15 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: I need help using the system command
Message-Id: <356432BB.4AACDF0C@matrox.com>

Steve DeWitt wrote:[snip]

>                         system disable laf;

You need to quote your arguments:

system "disable", "laf";

should do it!

--
Ala Qumsieh             |  No .. not just another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)





------------------------------

Date: 21 May 1998 15:26:50 GMT
From: RKLINE@cortex.nlm.nih.gov (Bob Kline)
Subject: Re: Problem de-referencing a reference to a typeglob stored in a hash
Message-Id: <6k1h3q$q3s$1@lhc.nlm.nih.gov>

I'm trying to follow up on all the pieces of this so I understand
everything you're saying in the FMTEYEWTK on this topic, in particular
the passage

  The angle bracket notation is mostly just an interface to the 
  built-in function named `readline'. 

However, it doesn't appear as if readline made it into the 
documentation.  It's listed as one of the "functions new to version 5"
but I can't find it anywhere in 'man perlfunc' (5.004).  Am I looking
in the right place?

Thanks again.

Bob

Tom Christiansen (tchrist@mox.perl.com) wrote:

: :Thanks, Tom, I see what's happening now.  One of the corners of
: :the language that's not always intuitive.  Do the Perl gods
: :ever regret this tricky overloading of <>?

: Oh, yes.  Almost as much as indirect object slot parsing.


------------------------------

Date: 21 May 1998 11:52:48 -0400
From: davet@angel.uunet.ca (Dave Till)
Subject: Re: Software vendor liability [Was: Does Perl have a IDE?]
Message-Id: <6k1ikg$b9a@angel.uunet.ca>

In article <MPG.fccd319713075c09896db@news.min.net>,
John Porter <jdporter@min.net> wrote:
>> Auto makers consider themselves responsible if they sell
>> something broken.  Software manufacturers do not.  They 
>> even make you pay to fix their mistakes.  This is evil.  
>
>Clearly.  And yet, large companies with powerful and
>presumably competent legal departments continue to give their
>custom to software vendors who license their software under
>these terms.  One wonders how this situation came about.

The problem is that software, by its very nature, has zero
tolerance for error.  This isn't true in other disciplines.

When you build a car, you don't have to perform each
assembly operation perfectly - just well enough to have
it work.  (If a door is a millimeter or two off, it will
still close.)  An equivalent error in software makes it
non-operational.


------------------------------

Date: Thu, 21 May 1998 08:00:40 -0700
From: Silvio Picano <spicano@ptdcs2.intel.com>
Subject: Re: Sourcing Unix environment file?
Message-Id: <35644198.167E@ptdcs2.intel.com>

Thuy Nguyen wrote:
> 
> Hi,
> 
> I am trying to source in a Unix environment file from a perl script, but
> was unable to do so.
> 
> Here is the problem:
> 
> at the Unix prompt, one can type
> 
> $ . /etc/navenv.d/DBSEnv
> 
> and it would read the DBSEnv file and set the appropriate environment
> parameters.
> 
> I have tried using the system and exec commands, but none of it works.
> e.g
> 
> $cmd = ". /etc/navenv.d/DBSEnv";
> system ($cmd);
> 
> I have tried to overwrite the special metacharater "." by preceding the
> "." with the "\", and it still did not work.
> 
> Have anyone run into this problem before?  And if you have, how would
> you resolve it? Any suggestions will be appreciated.  Thank you.
> 
> Regards,
> 
> Thuy


Need some trickery to get the environment (say a .cshrc, or other
'setenv ...'
command file) into perl's %::ENV; using something like this (if the 

  open(CSH_OVERLOADING_FH, "/bin/csh -cf 'source $csh_file_s >>&!
/dev/null; env' |") ||
    return (-2, "$routine_s: failed open(/bin/csh -cf 'source
$csh_file_s >>&! /dev/null; env' |)");

  while (<CSH_OVERLOADING_FH>) {
    chomp;

    ;# key=value pairs (e.g., environment vars).
    if (/^(\S+)=(.*)/) {
      $key_s = $1;
      $val_s = $2;
      $::ENV{$key_s} = $val_s;
    }

    ...

Be careful and use this only on benevolent csh files.

Silvio


------------------------------

Date: Thu, 21 May 1998 15:05:34 +0000
From: Andy Holyer <andyh@pavilion.co.uk>
Subject: Spawning kermit sessions from perl5
Message-Id: <356442BE.392944D8@pavilion.co.uk>

I have a problem: there's probably a simple solution to this, but I
haven't been able to find it mentioned in the docs.

I'm trying to implement a simple BBS in perl5. The program sits on
/dev/cuaa{n} answering incoming calls to the modem on that line. I've
opened STDIN and STDOUT to this device, to simplify matters.

The program needs to upload or download files at various points. The
server-side name of these files is local to the program. What I've got
so far is this:

system( "kermit -r -a $filename") || die "Failed in uploading $filename:
$!\n";

Since children spawend by system() inherit STDIN and STDOUT, this should
recieve a file, put it in $filename and then go about its business. But,
it doesn't work.

What am I doing wrong? Is there OTOH a perl module to do
uploads/downloads? should I do something else?

Thanks in advance for any helpful suggestions.

Andy Holyer, Lewes, E Sussex, UK




------------------------------

Date: 21 May 1998 15:14:31 GMT
From: bbirthisel@aol.com (Bbirthisel)
Subject: Re: Win32: Calling DLL's from Perl
Message-Id: <1998052115143100.LAA00187@ladder01.news.aol.com>

Hi Dave:

>I've seen references to Win32::API but I can't find this on CPAN.

It somehow got lost on the way. It used to be available on Aldo's site in
Italy - but that site has been down for a while. The package was distributed
as Win32API.zip and seems to be available somewhere. I could put a copy
on my site if that would be helpful. This IS the item you are looking for.

Aldo Calpini has been posting again after an absence - so there may be progress
soon in improving the availability.

>If necessary, I could use the ActiveState Perl.

The distribution supports both AS and GS ports (5.004_02). The XS is there
too - you would need to compile it to work with 5.004_04.

>I have installed perl5.004_04 on my NT machine, compiled using MS VC++.

You will need to get good documentation on the calling requirements of the
routines in the DLL. The Win32API allows you to make make the calls - but
won't guide you smoothly through them. It feels more like "C" than "Perl".
You need to declare the data types, use "pack" and "unpack", and do most
of your own parameter validation. The documentation is sketchy - but lots
of people (including me) have done it successfully. A couple of suggestions:
ALWAYS use "-w" and usually "use strict" as well. You have to declare a bit
more upfront - but it's definitely worth it. When a DLL routine fails, it often
provides no clues except a FALSE boolean!

Good luck.

-bill


------------------------------

Date: Thu, 21 May 1998 15:06:59 GMT
From: fritz.knack@nospam.POPULUS.net (Fritz Knack)
Subject: Re: Writing to files
Message-Id: <3564426c.12789648@cnews.newsguy.com>

On Thu, 21 May 1998 10:58:37 -0700, Marcia L Sussman
<pi83@dial.pipex.com> wrote:

>I have a program which opens a file for reading, closes it again, 
>then re-opens the file for writing and writes the information
>with additions. This should be easy, and it works 99% of the
>time.
>But occasionally the file becomes empty. Why???
>I'm locking the files whilst in use and closing them properly.
>Anyone else had this problem? Any ideas?
>Thanks
>Marcia Vigar

Not really an answer to the problem (detail please?) but if you happen
to be just putting your "additions" at the end of the file, there's no
reason to read it and re-create it to begin with: open for append.

open (FH, ">>$file_name) || die "Gasp! Cough!";



-------------------------
Sorry 'bout the nospam in the From field. You know how those 'bots are.


------------------------------

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 2661
**************************************

home help back first fref pref prev next nref lref last post